Security :: The Remote Server Returned An Error: (401) Unauthorized?
May 12, 2010
this is a bit of a strange one. have my front page of my intranet site and I am trying to pull an RSS feed from a subdirectory forum.
Root
Default.aspx
--->Forum
--->Rssfeed.aspx
On my default.aspx I can pull RSS Feeds from the BBC or any other external website so my code is working fine but when I try and pull a RSS feed from my local server I get "The remote server returned an error: (401) Unaithorized".Now, if I go to the Forum directory within IIS and change the directory secutiry from "Integrated Windows Authentication" to "Enable anonymous access" the RSS comes through to the front page without any errors, however, the forum requires "Integrated Windows Authentication" to be enable to that my users can post on the forum. If I turn both on then Windows authentication is still ignored for my users when they visit the forum.I have hardcoded my credentials in to the Default.aspx.cs to see if that helps but I still get Unauthorized message.My code is here:
[Code]....
As you can see I have tried a couple of different ways to get the credentials to work, it just seems to ignore my credentials and I have full admin access to the server and when I visit the forum it picks up my username.
View 7 Replies
Similar Messages:
Oct 16, 2012
I am getting error while click on tweet error is"{"The remote server returned an error: (401) Unauthorized."} ....
View 1 Replies
Nov 9, 2010
In IIS we have a virtual directory (named as "Documents") with in application virtual directory (named as "Reference") that points to an shared folder.All the files with in the "Documents" folder are listed and opened by the user (by clicking on the file name) with in the application
"Reference" application runs under an application pool. This application pool is configured to run with an Active directory account. This AD account has been granted write and modify permissions on the shared folder that contains the html files.
When user tries to open any of the html file located with in the shared location from the application following error is thrown.
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
I tried to browse to the location manually and I can see the required files there.
These files where accessible from our application until yesterday. But we started encountering this error from today.
Is there any IIS settings that needs to be modified?
View 4 Replies
Apr 30, 2010
I am running this piece of code to get the source code (as string) of my webpage.
The problem is why this function returns 404 error?
Private Function getPageSource(ByVal URL As String) As String
Dim webClient As New System.Net.WebClient()
Dim strSource As String = webClient.DownloadString(URL)
webClient.Dispose()
Return strSource
End Function
View 1 Replies
Mar 17, 2010
I have a simple Upload method that send the file to the FTP server, if the file name is already exist, i will overwrite the existing file in the server. This method is working fine.
[Code]....
I'm just wondering how would i be able to change the filename ( originalFileName+timeStamp) during the process of uploading to avoid overwriting of files? I did try changing the method property of WebRequestMethod to
[Code]....
But I'm getting an error
The remote server returned an error: (550) File unavailable (e.g., file not found, no access)
View 4 Replies
May 7, 2015
The following error is coming :
The remote server returned an error: (403) Forbidden.
while working with google maps the code I have written for this is :
string fulladdress = string.Format("{0}.{1}.{2}", txtStreet.Text, txtCity.Text, txtCountry.Text);
string skey = ConfigurationManager.AppSettings["googlemaps.subgurim.net"];
//HttpWebRequest request = (HttpWebRequest)WebRequest.Create(fulladdress);
//request.UseDefaultCredentials = true;
[Code] ....
View 1 Replies
Mar 29, 2010
why I'm getting this error? I just re-created (not migrated) my app that was in ASP.NET 1.1 to ASP.NET 2.0. Whole app works perfectly. The only problem I'm getting with this piece of code for the Web Services. I'm running both versions at the same time side-by-side and it works fine in 1.1 and doesn't work in 2.0.
URLName = Context.Request.Url.Segments
URLName0 = URLName(0)
URLName1 = URLName(1)
URLName2 = URLName(2)
URLHost = Request.UserHostName
URLStr = "http://" & URLHost & URLName0 & URLName1 &
"SomePage.aspx?" & "SectionID=" & SectionID
' Create a 'WebRequest' object with the specified url
Dim myWebRequest As WebRequest =
CType(WebRequest.Create(URLStr), WebRequest)
' Send the 'WebRequest' and wait for response.
Dim myWebResponse As WebResponse =
CType(myWebRequest.GetResponse(), WebResponse)
Bam! Error! The remote server returned an error: (500) Internal Server Error.
View 11 Replies
Dec 8, 2010
The remote server returned an error: (407) Proxy Authentication Required.I get it when I use the GetReponse() method in WebRequest Dim request As WebRequest = WebRequest.Create(getNextURL()) Dim httpResponse As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
View 1 Replies
Nov 9, 2010
I have written the following code in Global.asax but I'm getting error The remote server returned an error: (404) Not Found in the
[Code]....
View 2 Replies
Aug 9, 2010
I move a file from server to another server .in local it is woking fine .but in production it is getting error
The remote server returned an error: (408) Request Timeout.
i used like this ..
objWebClient.UploadFile(ClientLocation,
"POST", fileName.ToString());
View 3 Replies
May 7, 2015
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ASPSnippets.SmsAPI;
[Code] ...
Also include AspSnippets.SmsAPI in solutionexplorer's Reference foldergot error at following line
//Single SMS
SMS.SendSms(txtRecepientNumber.Text.Trim(), txtMessage.Text.Trim());the error is the web remote server returned error (403) forbidden
View 1 Replies
Apr 23, 2010
string furl = [URL] + rowr["msidn"].ToString() + "&subscode=" + rowr["content_id"].ToString() + "&price=" + cost + "&extid=" + exter + "&days=" + rowr["duration"].ToString() "&eventtype=ReSubscription&templateid=14";
View 1 Replies
Aug 16, 2010
I want to call my WebService using HttpWebRequest, but I get Error:The remote server returned an error: (500) Internal Server Error. The webservice works fine through the following url: [URL]
[Code]....
View 3 Replies
Nov 2, 2010
I am trying to create a basichttpbinding with custom validator. I create a self signed cert in IIS @ 443.
My endpoint in service config looks like this
[Code]....
The service is running fine (I can see it in browser).
In the client, I am setting client credentials and then accessing a method but at this point i get the following exception
There was no endpoint listening at [code].... that could accept the message. This is often caused by an incorrect address or SOAP action
The remote server returned an error: (404) Not Found.
View 1 Replies
Jun 2, 2010
I have a WCF Service that I have boiled down to next to nothing because of this error. It is driving me up the wall. Here's what I have now.
A very simple WCF service with one method that returns a string with the value, "test".
A very simple Web app that uses the service and puts the value of the string into a label.
A web server running IIS 6 on Win 2003 with a SSL certificate.
Other WCF services on the same server that work. I publish the WCF service to it's https location I run the web app in debug mode in VS and it works perfectly. I publish the web app to it's https location on the same server the WCF service resides under the same SSL certificate I get, "The remote server returned an error: (403) Forbidden" I have changed almost every setting in IIS as well as the WCF and Web apps to no avail. I have compared setting in the WCF services that work and everything is the same.
Below are the setting in the web.config for the WCF Service and the WEB app: It appears the problem has to do with the Web app but I am out of ideas.
WCF Service:
<system.serviceModel>
<bindings>
<client />
<services>
<service behaviorConfiguration="Ucf.Smtp.Wcf.SmtpServiceBehavior" name="Ucf.Smtp.Wcf.SmtpService">
<host>
<baseAddresses>
<add baseAddress="[|URL]" />
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" contract="Ucf.Smtp.Wcf.ISmtpService" bindingConfiguration="SSLBinding">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Ucf.Smtp.Wcf.SmtpServiceBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" httpsHelpPageEnabled="True"/>
</behavior>
</serviceBehaviors>
</behaviors>
Web App:
<system.serviceModel>
<bindings><wsHttpBinding>
<binding name="WSHttpBinding_ISmtpService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
establishSecurityContext="true" />
</security>
</binding>
<client>
<endpoint address="[URL]"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISmtpService"
contract="SmtpService.ISmtpService" name="WSHttpBinding_ISmtpService">
<identity>
<dns value="localhost" />
</identity>
</client>
</system.serviceModel>
View 3 Replies
Aug 7, 2010
using oAuth.net library for the Gmail Contacts API The request seems well-formed and I have stepped through the requests, and cannot discern anything wrong. Tried checking if the timestamp is an issue - it seems that was a common issue on the gmail forums, tried changing to various time-zones, still no luck.
public string WebResponseGet(HttpWebRequest webRequest)
{
StreamReader responseReader = null;
string responseData = "";
[Code]....
View 1 Replies
Sep 2, 2010
writing a web Service and one of its web method, I want it to download a png file in form
of buffer from remote server. And My consume application will write that buffer retured by Web service in to file on User's Computer.
However, I am able to do this using Local Web Service but when I published that service on my web server, I always get null retuned
And even in one of my test code while copying file from that server , I always get Access Denied.
Following things I have done for above issue.
1] I even tried making the Anonymous user for the web service the system administrator (with the correct password), to no avail.
2] I also tried sharing out the folder I'm pulling files from to allow access from Everyone.
[Previously same service was working fine on another remote server with IIS 7.0, we checked server IIS Settings but in vain.]
if you know where we are mistaken guide me to resolve this issue as its very urgent.
View 2 Replies
Jun 19, 2010
I am calling a remote service and authenticating using a certificate. When testing with a Console App, everything works fine. When calling from an ASP.NET Website (.NET 4.0, IIS7) I receive a response code of 401 -- Unauthorized.I am adding the certificate using code such as:
var client = new TheGeneratedProxy();
client.ClientCertificates.Add(new X509Certificate("D:cert.pfx", "myPassword"));
(NOTE: I have also loaded the .pfx into the local Certificate Store using IE. The certificate is loaded into my "Personal" store -- so I suspect this to be the problem, since the Website will be running under a different account.)
View 1 Replies
Aug 4, 2010
I am using Sql Server 2008 to connect to a Remote Server. Everything was working fine for the last couple of months, and i was successfully connecting to the remote server. Today it suddenly stopped connecting to the remote server. note that i did not alter any configuration settings. Did my isp block Sql Server. My ISP is using ISA SERVER? The error details are:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider) I am using Microsoft Firewall Client For ISA Server for opening ports. But today nothing is working.
View 1 Replies
Aug 2, 2010
I am on SBS 2003. Whenever I approach either ipaddress/remote, ipaddress/monitoring or ipaddress/backup I get the error below. When I do ipaddress/Exchange or ipaddress/newvirtualdirectory it works allright. This situation happens when I appraoch that site from a wan, from a lan and local on the server itself. This is the error message I get:
[Code]....
View 2 Replies
Jul 16, 2010
filetoread = Server.MapPath("\servernamesharefile.csv")
filestream = File.OpenText(filetoread)
readcontents = filestream.ReadToEnd()
It works fine if I put the file in the local directory and use "filetoread = Server.MapPath("file.csv")", but won't do it over the UNC path.I'm guessing the problem is security related but can't find any info related to it, do I need to somehow specify a username/password somewhere ?
View 3 Replies
Feb 2, 2010
I can't seem to create a directory on a remote server even though I have given permissions for the asp.net application for all users. I gave full control to the Asp.net user, local computer user, administrators, Network Service, etc and I don't know what else to try. My code is below:
[Code]....
View 9 Replies
Jan 25, 2010
i have used aspnetDB database for my application for keeping user details. Once after creating role and user, Adding user to the perticular role .Everything is working fine ...... and but i hosted the application and generating script for AspnetDB database
by using "DatabasePublishingWizard" and run this script on remote server everything is fine and grant permission to Stored procedures also.But i couldn't login with the user that i created on localy ,But the user is there in remote DB ,
My application located on ASP.NETSSF folder in localy, every link on local take like this asp.netssf/default.aspx so and so.....But in remote it's domainname.com/defaulst.aspx
i mean it's in root [virtual directory] directory whille remote hosting and asp.netssf folder in localy ,
why i couldn't access this on remote
2. can i run asp.net configuration sttings for remote server ,if so how can i ?
3.alas what is best solution for running script on remote server ?
View 15 Replies
Jan 27, 2011
Can I get who the remote user is on IIS Server that is not part of the domain without challenging/prompting the user? I am thinking not, but wanted to see if anyone had a different answer. I added the server to my intranet zone but that didn't cause IE to send any user information. Or maybe it did but since the IIS server is not part of that domain it can't do anything with the user information. I am looking at the ServerVariables in the Request object.
View 1 Replies
May 24, 2010
I get this error when I deploy the application on the remote server. This application works fine on my local machine though. It is built in MSVisual studio 2008.
View 2 Replies