.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Adding Web Service

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net
 

Hello,

          I m adding web service to the application. I m getting error in reference.cs.


The namespace "Webservice" already contains definition for "errortype"


Can we make changes in refernce.cs. ?

Will it effect the web service operations ?

TIA

Ramll




View Complete Post


More Related Resource Links

Adding AJAX-enabled WCF Service to the Solution throws an error

  
Hi I am just trying to learn Ajax enabled WCF service, when I try to create a new web application and add new item "AJAX-enabled WCF Service" I get an error message that "The extension of type 'System.ServiceModel.Configuration.WebScriptEnablingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not registered in the extension collection 'behaviorExtensions'. I had .net2.0/VS2005 and then I installed VS2008. I thought it might be an issue with Machine.config. So I am attaching my machine.config info. <?xml version="1.0" encoding="UTF-8"?>    <!--    Please refer to machine.config.comments for a description and    the default values of each configuration section.     For a full documentation of the schema please refer to    http://go.microsoft.com/fwlink/?LinkId=42127     To improve performance, machine.config should contain only those    settings that differ from their defaults.    -->    <configuration>      <configSections>    <section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, Publi

Problem adding a Service Reference

  

Hello all.

I am developing a Web Application using Visual Studio 2010 in witch I have to add a Service Reference to http://dev.virtualearth.net/webservices/v1/geocodeservice/geocodeservice.svc?wsdl.

The problem is that my company's network requires a proxy authentication. So when I enter the "Add Service Reference" dialog, paste the url and click "go" I get a "(407) Proxy Authentication Required" error and cannot add the service.

I also tried using svcutil but the result, obviously, was the same.

How can I work around this? Is there somewhere I can specify the required proxy? Googling around, I found some comments that it can be specified in the Web.config, but I can't find more details on how to do this.

Thanks in advance.


Adding multiple users to a document library column by web service

  

I'm attempting to create some VB code to call a SharePoint Web Service to add a document and associated metadata to a document library. I can successfully add metadata to a text column but I'm having some problems getting multiple entries into a column which is specified to take multiple users (and does so when they are added manually) although I can get a single user in using the following snippet.

Dim info2 As MySharePoint.FieldInformation = New MySharePoint.FieldInformation()
info2.DisplayName = "Authors"
info2.InternalName = "Authors"
info2.Type = MySharePoint.FieldType.User
info2.Value = "1"

I'm hoping that someone will be able to advise me of the approach or syntax necessary to add multiple users to this Authors column e.g. Users 1 and 74. I note that

info2.Value = "1,74" or info2.Value = "1;74"

don't appear to work.


On adding WCF Service reference element is not created

  

Hi Friends,

I am using x.509 certificate based authentication in my WCF service. In development stage, I created a x.509 certificate using makecert utility. Installed it on my local machine. Added the reference to the certificate in my WCF service. When I added the service reference to my Test App, following element got created in the app.config file of the Test App.

            <endpoint address="http://localhost/MyService/MyService.svc"
                binding="wsHttpBinding" bindingConfiguration="wsHttpEndpoint"
    contract="MyService.IMyService" name="wsHttpEndpoint">
                <identity>
                    <certificate encodedValue="Long encoded string..." />
                </identity>
            </endpoint>

I then deployed the WC

On adding WCF Service reference element is not created

  

Hi Friends,

I am using x.509 certificate based authentication in my WCF service. In development stage, I created a x.509 certificate using makecert utility. Installed it on my local machine. Added the reference to the certificate in my WCF service. When I added the service reference to my Test App, following element got created in the app.config file of the Test App.

            <endpoint address="http://localhost/MyService/MyService.svc"
                binding="wsHttpBinding" bindingConfiguration="wsHttpEndpoint"
    contract="MyService.IMyService" name="wsHttpEndpoint">
                <identity>
                    <certificate encodedValue="Long encoded string..." />
                </identity>
            </endpoint>

I then deployed the WC

On adding WCF Service reference element is not created

  

Hi Friends,

I am using x.509 certificate based authentication in my WCF service. In development stage, I created a x.509 certificate using makecert utility. Installed it on my local machine. Added the reference to the certificate in my WCF service. When I added the service reference to my Test App, following element got created in the app.config file of the Test App.

            <endpoint address="http://localhost/MyService/MyService.svc"
                binding="wsHttpBinding" bindingConfiguration="wsHttpEndpoint"
    contract="MyService.IMyService" name="wsHttpEndpoint">
                <identity>
                    <certificate encodedValue="Long encoded string..." />
                </identity>
            </endpoi

adding a service reference throws a contract error

  

Hi

I added a service reference via the add service reference method. I can see all of its services in the intellisense but when I run the project and it executes the line where I instantiate the service : MyProjectName.ServiceReferenceName.IServiceReferenceClient  client = new  MyProjectName.ServiceReferenceName.ServiceReferenceClient;

it throws this error:

Could not find default endpoint element that references contract 'ServiceReferenceName.IServiceReferenceClient' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

 

Now this within my class library and I have added the service reference in my class library project.

Kind Regards

Ernst


finding url to use when adding a service reference

  

I have sample code from stamps.com to access their SOAP style web services.  I would like to create a new project and add a service reference to it for the Stamps.com soap web service. How do I get the correct URL from the working project to use when adding the service reference to the new project?

I click properties of the web reference in the working stamps.com supplied project.  The web reference URL is https://swsim.testing.stamps.com/swsim/swsim-v4-wsdl.aspx

In another project, I click "add service reference", then paste that URL into the address line and click Go. Get back an error:
There was an error downloading 'https://swsim.testing.stamps.com/swsim/swsim-v4-wsdl.aspx'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'https://swsim.testing.stamps.com/swsim/swsim-v4-wsdl.aspx'.
There was no endpoint listening at https://swsim.testing.stamps.com/swsim/swsim-v4-wsdl.aspx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (404) Not Found.

thanks,

 


while adding service reference in .net 2008

  

The document at the url https://hostname/app1/abc.svc was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'DISCO Document' is 'There was an error downloading 'https://internalsystemname/app1/abc.svc?disco'.'.
  - The request failed with HTTP status 502: Proxy Error ( No data record is available. For more information about this event, see ISA Server Help.  ).
- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.
- Report from 'https://hostname/app1/abc.svc' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.
- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.
The document at the url https://hostname/app1/abc.svc was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'DISCO Document' is 'There was an error downloading 'https://internalsystemname/app1/abc.svc?disco'.'.
  - The request failed with HTTP status 502: Proxy Error ( No data record is available. For more informatio

Adding IServiceClient interface to generated proxy service client class

  
Hi,
would it be possible to add a service client interface to a generated service client class in a generated service proxy in order to achieve easier testability?
Here's an example of what I am asking the way I do it manually http://blog.vuscode.com/malovicn/archive/2009/11/01/design-for-testability-wcf-proxies.aspx

This would not break backward compatibility (safe to be added)

Is this question more for Connect? :)

Thanks,
Nikola

Problem while Adding reference of my Wcf Service

  

Hi

I have my wcf service hosted in the iis of the my development server.I am able to directly access the url of the service from both the server and the client browsers.I am also able to see the wsdl generated.

But when i add service reference from Visual studio 2008/2010,i get the following error..

The document at the url http://something.svc was not recognized as a known document type.

The error message from each known type may help you fix the problem:

- Report from 'http://something.svc' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from 'DISCO Document' is 'There was an error downloading 'http://something.svc?disco'.'.

 - The request failed with HTTP status 503: Service Unavailable.

- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

Metadata contains a reference that cannot be resolved: 'http://something.svc'.

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.

The remote server returned an error: (401) Unauthorized.

If the service is defined in the current 

Problem adding service reference to web services in VS 08

  

Hi,

I’ve been trying to write some C# in Visual Studio 2008 to leverage SharePoint Web Services. I’ve scoured the web for help on this problem. I’m just beginning to learn .NET programming, but I’ve done a bunch with SharePoint Web Services with javascript and then with jQuery.SPServices.

 

If I start a new Console Application project and try to add a Service Reference, I put in my url: …/_vti_bin/Authentication.asmx and try to attach it. It tells me that there’s a problem with the certificate (which I get in the browser and SP Designer).

 

I get this error:

The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'https://example.com/myCollection/_vti_bin/Authentication.asmx'.
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic Realm="example.com"'.
The remote server returned an error: (401) Unauthorized.
If the service is defined in the current solution, try building the solution and adding the service reference again.

If I click Advanced and Add Web Reference, I try again. This time, the browser window brings up the form we use to authenticate. From what I understand about the architecture, the MOSS

Adding Web Service to Smart Device Project - Windows Mobile 6 Professional

  

Hi All,

I'm new to developing mobile apps and have hit a brick wall. I use Web Services all the time so I know I have created it correctly and it works. The issue is that i cant seem to add it to my class or form in the Smart Device Project.

When I right click I get the option to add Web Reference, I then navigate to the url and add as I normally would. When I then try to access the service I cant seem to navigat to it from code and it is not available. I have also tried adding a Web Service directly by 'Add New Item, but this file type is not available in the list of installed templates.

Any help here would be greatly appreciated.

Thanks,
Chris


Error: "The search service is currently offline." when adding a rule to a site search scope

  

We have a portal on our SharePoint farm in which the users want to create a new search scope for that portal only (rather than me creating a global search scope). We are able to create the scope without problem, however when we click "add rules" I get the error message: "The search service is currently offline."

This isn't true though as the search server/indexer is fine and online. We are having problems with our logs so theres no way to troubleshoot this, but I'm wondering if anyone has any insight into the issue.

 

Thanks. 


Adding namespace prefix to web service request & response

  
Hello all,

I have a simple webservice, "HelloWorld" with one parameter. If I look at the SOAP request generated for this webservice it shows me this:

Windows Service Applications Tutorials

  
You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

  
In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend