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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

http status 415 unsupported media type

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

Dear all,

Please Provide me solution of http status 415 unsupported media type error.. 

i have used

<?xml version="1.0" encoding="utf-8"?>

<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

<add assembly="Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

        <add type="Microsoft.Web.Services3.Description.WseExtensionImporter, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />


View Complete Post

More Related Resource Links

Anonymous Web Site receives "The request failed with HTTP status 401: Unauthorized"


I set up a test website on my local box and was able to access sharepoint search using the querySearch web service from SP.  After I got it all working properly I transferred the code to the target website that is set up with anonymous access for all people on the fab floor.  However from this website I keep getting the 401 error.  It can't be SP because the same code worked from my local website "localhost".  Any suggestions?  we don't want to have to have the fab people log in so we can't not have the box anonymous.  I would appreciate any suggestions very much!!!

Using WSS 2007 with MOSS.


  private void GetDefaultCredentials()
      m_where = "get configuration data for credentials";
      string userid = ConfigurationManager.AppSettings[ "userid" ];
      string password = ConfigurationManager.AppSettings[ "password" ];
      string domain = ConfigurationManager.AppSettings[ "domain" ];

      m_where = "set search query credentials";
      m_query.Credentials = new NetworkCredential ( userid, password

While calling Web service gets exception "The request failed with HTTP status 401: Unauthorized"

Hi All, I created a ASP.NET web service, which was hosted on default visual studioserver, and on excecution of webservice it run .exe file which in turn update xml file. Now i hosted this webservice on IIS 6.0 server, and when i run the service, itfails to execute the exe.When i run it on debug mode, i never get any exception.Code...public string HelloWorld()    {        Process myProcess = new Process();        try        {            myProcess.StartInfo.UseShellExecute = false;            // You can start any process,             myProcess.StartInfo.FileName = @"E:\Projects\some.exe";            myProcess.StartInfo.CreateNoWindow = true;            myProcess.Start();            myProcess.Close();            myProcess.Dispose();            return "Suceess";         }&n

i cannot access iis virtual directory using http protocol..getting status code error 403

i am trying to connect to remote exchange using powershell..while using powershell session i get status error 403...i changed the settings in iis manager...i have set all the settings in the iis manager as said in the msdn support blogs...yet i get the same error when i access it in the client url and also in powershell of the client computer...if i cannot connect using powershell,can i connect using .net???somebody help me...i am beginner and i am stuck...

Dataview Webpart - display document type icon with status

Hello, I recently came across an excellent post by Marc Anderson on how to surface the document icon within a DVWP. http://sympmarc.com/2008/09/10/displaying-the-document-type-icon-in-a-dvwp-in-sharepoint/ What I wanted to know is has anyone any knowledge of how to extend this so that the icon will reflect if a document is checked out? Thank you for your comments and thoughts. Sincerely, Tim

An unrecognized HTTP status was received. Check that the address can be accessed using Internet Expl


Hi All,

I am getting following error message in my crawl logs.

An unrecognized HTTP status was received. Check that the address can be accessed using Internet Explorer. (WebExceptionStatus KeepAliveFailure The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.)

Any idea how to solve this issue ?

WCF The request failed with HTTP status 404: Not Found



I get the error above with a WCF service I've deployed to a Windows Server 2008 box (with IIS 7). When using a test client with a proxy WSDL class to try to consume the service this error pops up while debugging. Using http is fine, however using https causes the error. We do have an SSL on the URL for the WCF service.

Is there a setting I'm missing?


WCF The request failed with HTTP status 404: Not Found


I get the error above with a WCF service I've deployed to a Windows Server 2008 box (with IIS 7). When using a test client with a proxy WSDL class to try to consume the service this error pops up while debugging. Using http is fine, however using https causes the error. We do have an SSL on the URL for the WCF service.

Is there a setting I'm missing?


SQL Server Reporting Service 2008 R2 - The request failed with HTTP status 401: Unauthorized.

I got the error "The request failed with HTTP status 401: Unauthorized." when I call the Reporting Service Web Service.

The code is very simple:

// Initialise the reporting service Web Service

this.RSWebService = new ReportingService2010();

// Pass windos authentication credentials to Web Service

this.RSWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;

// List children

List<CatalogItem> reports = this.RSWebService.ListChildren(folder, false).ToList();

The SQL Server is installed on a different machine (say server A) from the Web server (say server B). We are using Windows Server 2003.

The code work fine for all the scenario below:

i) Run locally (XP) to call the web service on the sql server

ii) Provide the Network Credentials with the username, password, and domain when calling the web service

iii) If the web server and sql server is using same server (i.e. not distributed)

I'm using windows authentication and impersonation. Any idea?

Reporting Services 2008: "HTTP status 401: Unauthorized" Issue


I'm getting the error "The request failed with HTTP status 401: Unauthorized" whenever I try to list the reports on my reporting server. The weird thing is, it works when I run the asp.net application on my dev machine hitting the server reporting services web service url (http://www.example.com/reports/reportservice2005.asmx?wsdl) but when the asp.net app is installed on the server (running iis 7) hitting the same url I get the error. Here's my set up:


SQL Server Reporting services 2008 (not R2)

Web service url: http://www.example.com/reports/reportservice2005.asmx?wsdl


Created a proxy ReportingServices2005.cs

Web.config has <identity impersonate="true"/>

Code to list reports:

<asp:ListView ID="lvReportList" runat="server">
            <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
            <asp:HyperLink runat="server" ID="hpReportLink" NavigateUrl='<%#Eval("Url")%>'><%#Eval("Name")%></asp:HyperLin

Webs Webservices problem : The request failed with HTTP status 401: Unauthorized

I am trying to run this code to get the web collection details. I am running this code in debug mode in Visual Studio 2005. I am running this code on sharepoint.acme.com, the same machine on which MOSS 2007 is installed.

        Webs websService = new Webs();
        System.Net.SystemNetworkCredential credentials =
        websService.Credentials = System.Net.CredentialCache.DefaultCredentials;
        websService.Url = "http://sharepoint.acme.com/_vti_bin/Webs.asmx";

        System.Xml.XmlNode myNode = websService.GetAllSubWebCollection();

I get this error. "The request failed with HTTP status 401: Unauthorized" in the last line while debug mode running. Earlier it used to work fine, but today I see this problem. Both acme\administrator and sharepoint\administrator can log into SharePoint. I tried running this code by logging in to my win2k3 desktop as acme\administrator once and launching Visual Studio 2005 and sharepoint\administrator another time. Both time it I got the same error.

Could someone please help me in resolving this error?

Content Query Webpart Missing Content Type and Approval Status


I'm a great fan o the CQWP , and love the changes made in 2010 on this webpart. What bothers me is that I use to Filter Documents by Approval Status, thus showing Draft or Pending Documents and Group these by their Content Type.

Both these were available in 2007, but removed from 2010 CQWP. Any idea why, or how to bring this back? sample or URL guidance would be great. My gut feeling is custom XSLT but id like to confirm this first.

Thx a lot



The Requested Failed with HTTP Status 404:Not found when i access the webmethod in webservices


when I access the webservices URL through browser ,I am able to access the URL ,If i use the webmethod in c# code the error message is diplaying like "The Requested Failed with HTTP Status 404:Not found".

WsHttpBinding: No FaultException for http status code 400 (for 500 everything works fine)


A .NET client consumes web services using Soap 1.2 via WCF. The services generate SOAP errors with http status code 400 and body containing SOAP fault code as well as subcodes. The client side exception that is thrown only contains InnerException = {"The remote server returned an error: (400) Bad Request."} without ability to access SOAP error code information.

For http status code 500 type of errors everything works fine by raising a FaultException with information.

Is there any flag to get it working for http status code 400 as well?

http 400 Error when performing item upload after setting custom edit form on content type



What I am trying to do is create custom edit forms for different content types within the same document library.....so basically I have done the following:

  • I have created two site content types and reconfigured my library to use CT's. 
  • I then connected to my site using SPD. 
  • When examining my library I can see that I have the two CT that I added earlier.  I then created a new editform for one the CTs using the top ribbon menu and in the drop down box associated it to the CT.  I did not select this as the default form for the library.
  • I then updated the library CT (not site CT) with the url to form in the editform properties.

When I create a document and edit the properties it works fine - totally as expected.  However when I upload a document the default EditForm for the library is used and I can select the CT to associate the document to.  When I choose the CT with the custom form the new edit form is not found and I get a page not found error - http 400.

The full url for this library is is http://XXXX/functions/ehs/CSI

So the URL I have used is /functions/ehs/CSI/Forms/EditForm2.aspx (EditForm2.aspx) is my form and this is fine.  I have even used CSI/Forms/EditForm2.aspx and this works...  BUT ne

"The request failed with HTTP status 403: Forbidden" when asp page calls remote web service



I use iis7 on win7 pro. I develope an aspx web page which calls the web service in remote site.When it runs, I get an error in the below:

"System.Net.WebException: The request failed with HTTP status 403: Forbidden..."

What's the problem?

Thanks for helps.



The request failed with HTTP status 407: Proxy Authentication Required (the ISA server requires auth


I'm new to webservice. I writed an example to work with a web service which is supplied on Internet (its url: http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx ) when i tried running i got an error message as System.Net.WebException was unhandled
  Message="The request failed with HTTP status 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  )."

I had found some solutions such as:
+ using ISA firewall
+ configuring proxy from Machine.config
+ inside coding

The first:  I used ISA firewall but i still got the same error, my problem didn't resolve. I guessed that is because ISA firewall needn't use Credentials (username/password).

The second:
 I tried coding in my source, it was okie. This solution is good because following this way i can get defaultCredentials from cache but needn't define straightforwardly my credentials as username/password
my code is as follows:

DelayedStockQuote wsStock =

Response Content Type can not be set within Http Handler


as the subject, i have a handler that process all kind of request to the server (path="*"),

whenever i try to set the content type, it will be overridden by a default value "text/html",

i am using IIS7 + Framework 4  in integrated mode, any idea?

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