This thread states my problem exactly, but the thread is a couple of years old, so I'm starting a new post.
I have the same hosting provider (DailyRazor) as the poster of the above-linked thread, and I got the same response from them to my issue: That SQL Server CE databases were not supported on their servers (note that at first they appropriately
suggested I set the write permissions to that file).
The poster said he eventually got it to work by setting write permissions on the database file. I have tried this and it still is not working.
The error is:
Server Error in '/' Application.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Description: An
unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and
the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated
request user.
To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Source Error:
Line 17: }
Line 18:
Line 19: var selectedData = db.Query(selectCommand, searchTerm); Line 20: var grid = new WebGrid(source: selectedData, defaultSort: "Genre", rowsPerPage: 5);
Line 21: }
A free trial with a different host is a thought, but I'm sure I could make it work somewhere and I was hoping that someone who had actually done this with DailyRazor (as the previous poster indicated), that they would point out what I may be missing (as
I'm not entirely confident that tech support fully researched the issue).
if That SQL Server CE databases were not supported on their servers, you can not run your webmatrix site in that hosting. change that. I recomment www.hostasp.net economy plan is very cheap.
Based on the error message above, it seems you need to fix it by grant full permission (read and write). For hosting provider, you can try asphostportal.com, affordable and nice plan.
georgegi
Member
2 Points
5 Posts
WebMatrix files referencing SQL Server CE database throwing an error
Nov 28, 2012 02:00 PM|LINK
This thread states my problem exactly, but the thread is a couple of years old, so I'm starting a new post.
I have the same hosting provider (DailyRazor) as the poster of the above-linked thread, and I got the same response from them to my issue: That SQL Server CE databases were not supported on their servers (note that at first they appropriately suggested I set the write permissions to that file).
The poster said he eventually got it to work by setting write permissions on the database file. I have tried this and it still is not working.
The error is:
Server Error in '/' Application.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Source Error:
Line 17: } Line 18: Line 19: var selectedData = db.Query(selectCommand, searchTerm); Line 20: var grid = new WebGrid(source: selectedData, defaultSort: "Genre", rowsPerPage: 5); Line 21: }Source File: c:\inetpub\vhosts\gogetgeorge.com\httpdocs\Movies.cshtml Line: 19
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
Does anyone have any guidance to offer?
Thanks,
georgegi
wavemaster
Participant
1279 Points
1124 Posts
Re: WebMatrix files referencing SQL Server CE database throwing an error
Nov 28, 2012 02:50 PM|LINK
Open up a 3 month free trial with Azure and see if you can duplicate the problem.
Switch providers.
georgegi
Member
2 Points
5 Posts
Re: WebMatrix files referencing SQL Server CE database throwing an error
Nov 28, 2012 06:07 PM|LINK
A free trial with a different host is a thought, but I'm sure I could make it work somewhere and I was hoping that someone who had actually done this with DailyRazor (as the previous poster indicated), that they would point out what I may be missing (as I'm not entirely confident that tech support fully researched the issue).
ayanmesut
Member
219 Points
85 Posts
Re: WebMatrix files referencing SQL Server CE database throwing an error
Nov 28, 2012 06:36 PM|LINK
if That SQL Server CE databases were not supported on their servers, you can not run your webmatrix site in that hosting. change that. I recomment www.hostasp.net economy plan is very cheap.
georgegi
Member
2 Points
5 Posts
Re: WebMatrix files referencing SQL Server CE database throwing an error
Nov 28, 2012 06:53 PM|LINK
Thanks for the replies.
I will consider changing hosting providers if this does not get resolved.
If anyone has had success with DailyRazor, as I've been led to believe, I would love to hear from them.
GmGregori
Contributor
5438 Points
730 Posts
Re: WebMatrix files referencing SQL Server CE database throwing an error
Nov 28, 2012 09:19 PM|LINK
I suggest to google searching something like "sql ce HRESULT: 0x80070005 (E_ACCESSDENIED)".
There are a lot of pages over this problem: in my opinion one of the more promising is this one Deploying SQL CE 4 to IIS 7 - Special Permissions Needed?
Anyway, consider that this forum is reserved for programming issues and that deployment problems should be posted at this Webmatrix forum.
georgegi
Member
2 Points
5 Posts
Re: WebMatrix files referencing SQL Server CE database throwing an error
Nov 29, 2012 01:11 AM|LINK
Will do. Thanks for the direction, and going the extra mile.
carl.steinha...
Participant
922 Points
247 Posts
Re: WebMatrix files referencing SQL Server CE database throwing an error
Nov 29, 2012 02:01 AM|LINK
Hi georgegi,
Based on the error message above, it seems you need to fix it by grant full permission (read and write). For hosting provider, you can try asphostportal.com, affordable and nice plan.
Carl Steinhart
georgegi
Member
2 Points
5 Posts
Re: WebMatrix files referencing SQL Server CE database throwing an error
Nov 29, 2012 12:01 PM|LINK
It was indeed the permissions on the bin folder. Previously I had been focusing on the permissions on the App_Data folder. Thank you!