Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems Creating a file
Message
From
13/01/2011 13:07:38
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01496043
Message ID:
01496056
Views:
39
>>>>I've verified the URL is correct by displaying it on the form and copying it to a new web page and running it. I did get asked to login by the Report Server, maybe that's the forbidden part?
>>>
>>>Most likely. Perhaps the System.Net.CredentialCache.DefaultCredentials on the clients machine would not have been a valid login?
>>
>>Hmm, should i change it to DefaultNetworkCredentials? Or do I do this differently?
>
>I guess I'd look at the properties of the credentials used on your development machine and, since that is working, create and use the same credentials on the clients server. Of course I could be wrong - just saying what I'd try......

I think I need to understand the code a bit more.

Have I understood what these lines of code actually do?
// Create a HttpWeb Request object referring to the desired URL
System.Net.HttpWebRequest Req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(URL);
// Set the security credentials to be used by the httpwebrequest
Req.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
// Specify that we will call the Get method
Req.Method = "GET";
// Actually "run" the URL and get the response back.
System.Net.WebResponse objResponse = Req.GetResponse();
If I comment out the credentials then I get a (401) Unauthorized error on my PC. Which is different to the 403 error I'm getting at the client.

How do I look at the properties of the credentials on my machine?

Thanks for all your help.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform