Unable to import ServiceReference1 from ASP.NET MVC4

What using instructions do I need to get in the ServiceReference1 object in an ASP.NET MVC4 application?

ServiceReference1 is the name of my service link that I added. What is strange is that if I double-click on it, it does not call anything in the browser of objects ...

Update: for some reason, " Cancel" Reuse in reference assemblies " " solves my problem!

enter image description here

+4
source share
2 answers

To add to your update when you uncheck the box, and not all reuse types in referenced assemblies, just uncheck the box for what you need.

Not sure what you are looking for even more

+5
source

I found that sometimes this gets confused if you have a namespace like MyProject and a link to a service called MyService , but the code file you enter is in something like MyProject.AnotherNS . From this code file, you will need to enter MyProject.MyService to access the service, not just MyService . A super-safe way to make this always work is to use the global and type something like global::MyProject.MyService . global simply removes any implied prefixes (names) from the namespace in the code block.

+1
source

Source: https://habr.com/ru/post/1437401/


All Articles