Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems Creating a file
Message
From
14/01/2011 07:56:53
 
 
To
14/01/2011 07:23:59
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01496043
Message ID:
01496147
Views:
29
>>>>TBH I'm not au fait with all of the CredentialCache stuff. If I were you I'd try creating your own credentials and using that:
>>>>Req.Credentials = new NetworkCredential("UserName", "password"); // or other relevant constructor
>>>
>>>So create a user on the server with the necessary rights, then set the code to use this user? I don't particularly like that idea for the following reasons: I then need to hard code the password in, I need to work out what rights to assign to the user on the server. If somebody then changes the password on the server I have to recompile my code. Or am I misunderstanding what you suggested?
>>
>>So the web server at the oAppSettings.ReportServerURL address is under your control? So what is it currently expecting/accepting as a valid authentication/authorisation ?
>
>The web server is SQL Server Reporting Services and looking in the configuration manager it says the Service Account is "Network Service".
>
>I had a look at the event log and it sems the DefaultAppPool account is the one that my system is trying to use. Here's the detail of the log:
>
>Event code: 3005
>Event message: An unhandled exception has occurred.
>Event time: 01/14/2011 8:00:45 AM
>Event time (UTC): 01/14/2011 12:00:45 PM
>Event ID: fd216790eada4779be60461c14263d75
>Event sequence: 14
>Event occurrence: 1
>Event detail code: 0
>Application information:
>Application domain: /LM/W3SVC/1/ROOT/SIAS-1-129394800055232727
>Trust level: Full
>Application Virtual Path: /SIAS
>Application Path: C:\SIAS\
>Machine name: NEWIMIASDB
>Process information:
>Process ID: 4316
>Process name: w3wp.exe
>Account name: IIS APPPOOL\DefaultAppPool
>Exception information:
>Exception type: WebException
>Exception message: The remote server returned an error: (403) Forbidden.
>Request information:
>Request URL: http://localhost/SIAS/ReceiptEdit.aspx
>Request path: /SIAS/ReceiptEdit.aspx
>User host address: ::1
>User:
>Is authenticated: False
>Authentication Type:
>Thread account name: IIS APPPOOL\DefaultAppPool
>Thread information:
>Thread ID: 5
>Thread account name: IIS APPPOOL\DefaultAppPool
>Is impersonating: False
>Stack trace: at System.Net.HttpWebRequest.GetResponse()
>at SamaanSystems.IAS.Web.ReceiptEdit.btnSave_Click(Object sender, EventArgs e) in C:\Development\Mere Mortals .NET Framework 2008\SamaanSystems\IAS.Web\ReceiptEdit.aspx.cs:line 420
>at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
>at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
>at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
>at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
>Custom event details:
>
>Maybe that makes any sense to you?
>
>I've tried adding DefaultAppPool to have access to the Temporary Internet Files folder, but it tells me that user name is wrong.

You need to look in the DefaultAppPool properties (Identity tab) to determine what account was being used (chances are that unless you changed it then it will be 'Network Service'.

But I think we're a bit at cross-purposes here.
Is anonymous access enabled for the URL on the report server used by the HttpRequest?
If it is then all you need be sure of is that the IIS account used by that page on the report server (as determined above) has sufficient permissions/rights to access the required folders on that server.
If the page is NOT allowing anonymous access then your HttpRequest much include credentials that will be recognized as valid by the report server. This won't change the account used to process the page on the report server.
What happens if you try accessing the url from a browser? Are you prompted for login information?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform