I am trying to add a web reference service in an ASP.net MVC project.
However when I add the service I got following error,
Custom tool error: Unable to import WebService/Schema. The object
'Settings' already contains a property
'FreeLance_Web_VATService_checkVatService' not of type
WebServiceUrl. C:\FINALBUILD\User Portal\User.Web\Web
References\VATService\Reference.map
Some How the designer.settings.cs had already a service referenced with the same. Once I changed the name of the service and added again, it started working.
I tried all of the above and I still experienced this issue. It turns out that a reference was stored in my app.config. I got rid of it and then re-added the web refences. That fixed the problem.
What you can do is remove the existing services and try to re-add the reference to the mvc application.Other thing is try to search with the 'FreeLance_Web_VATService_checkVatService' name in the settings.cs and see what it has. There should not be same name for the objects which will lead to this conflict
I had the same issue as I had copied the configuration from another file. I had to delete the configuration and update the web reference. When you add web reference settings is automatically added to the configuration file and hence you should not copy that part from another file. Remove and from your configuration file,update web reference and check if it is recreated.
Related
We have one service reference in one project of a solution. I am trying to move this service reference to new project in same solution. But adding the service reference in new project using URL present in the service reference of old project is throwing 404 error. I am not sure where is this service hence do not have it my IIS.
I tried to copy all the files and adding them to source control. like copy paste but then it has some auto generated code under reference.cs which generates all classes. They have old namespaces and might have to change it to new namespace manually. So, not sure if this can cause some other issue as I will be manually updating the auto generated code.
Is there a way to add this service reference in my new project?
option 1 - find the url by debugging the first project
Assuming that the first project accesses the WCF service correctly, you can debug it to the point where it makes the service call and look at the the remote address in the watch
var url = currentProxy.Endpoint.Address.Uri;
option 2 - add reference to the project thats already working
add a wrapper class that makes the WCF call in your original project and then add project reference of your original project to the new project. now you can you use the newly created wrapper to access the WCF service from the new project via the wrapper
I am getting build failure due to warning in my web.config. Everything was fine before I added .net 2.0 Web service reference to the MVC project. I got warnings of Global element '{element name}' has already been declared for all the elements in my web.config. Searching has only turned up different issues than the one I am having.
Is there any way to fix this issue, perhaps by telling the configuration manager to ignore the config file in the referenced WS assembly?
I can not use the regular service reference as I am not able to call it via https. Or is there a way to reference the 2.0 web service as the regular service reference that can be invoked via https/ssl connection?
Edit: I also have a WCF service reference declared in the project, will that complicate the matter?
I figured out. I don't have to add .net 2.0 WS reference to the project. I can use in web.config to specify the transport protocol to be https.
However, it is wired that adding a web reference would invalidate the web.config elements. I would like to learn the cause of that and would appreciate your input.
So I’m trying to add a service reference in WebForms 4.5 project.
I keep getting a same error message:
The configuration for the service reference could not be added due to
the following error: An error occurred creating the configuration
section handler for system.ServiceModel/bindings: AssemblyResolveEvent
handlers cannot return Assemblies loaded for reflexion only.
You can test this service to add : http://beeyepoll.azurewebsites.net/apis/PollsService.asmx
It works in every project, except this one :(
Ended up creating separate DLL project and importing service reference there. Still don`t know why it did not work directly in the main project.
I am adding a webservice to a web project as a service reference. The error on adding which occurs on adding is
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved.
Before adding the webservice as a service reference I tried adding it as web reference.On doing it there was no error but, i was not able to access a class through the web reference.
So I went for the option of service reference.
I was able to add service reference to a web project and every thing works fine but I am unable to do the same in a class library.
Your help will be appreciated..
Thanks
Right click on your service in Solution Explorer and select View in browser.
you may have some errors in your service and in this way you can find out the errors.
I am using VS2008. I have a project connect with a database and the connection string is read from App.config via ConfigurationManager. We are using L2E.
Now I added a helper project, AndeDataViewer, to have a simple UI to display data from the database for testing/verification purpose.
I don't want to create another set of Entity Data Model in the helper project. I just added all related files as a link in the new helper project.
When I compile, I got the following error:
Error 15 The name 'ConfigurationManager' does not exist in the current context C:\workspace\SystemSoftware\SystemSoftware\src\systeminfo\RuntimeInfo.cs 24 40 AndeDataViewer
I think I may need to add another project setting/config related file's link to the helper project from the main project? There is no App.config file in the new helper project. But it looks I cannot add that file's link to the helper project. Any ideas?
In your project, right-click, Add Reference... In the .NET tab, find the "System.Configuration" component name and click OK.
"using System.Configuration" tells the compiler/IntelliSense to search in that namespace for any classes you use. Otherwise you would have to use the full name (System.Configuration.ConfigurationManager) every time. But if you don't add the reference, that namespace/class will not be found anywhere.
Note that a DLL can have any namespace, so the file System.Configuration.dll could in theory have the namespace "Some.Random.Name". For clarity/consistency they're usually the same, but there are exceptions.
In case you get are trying to access the cloud configuration file in your Azure Cloud service and get the error
CloudConfigurationManager does not exist in the current context
on CloudConfigurationManager class, then all you need to do is add the nuget package Microsoft.WindowsAzure.ConfigurationManager to your project.
And then, make sure you include the using statement "using Microsoft.Azure" in the class where you’re trying to access the cloud configuration file.
Hope this helps!!
I think you're missing a reference to System.Configuration.dll or a using System.Configuration clause