Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Write access to the web.config file
Guest
#1 Posted : Friday, December 7, 2012 4:45:10 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Hi all,
I will be really thankful if someone help me with this problem:
My application uses System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
to get access to the connectionstrings to manipulate and save them.
The code works just fine on IIS or UltiDev Cassini Web Server when started from Visual Studio with admin access.
However when install the app to UltiDev, which is runnig as NETWORK SERVICE there is an exception:

Exception Details: System.InvalidOperationException: Failed to map the path '/'.
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String path) +57

I appreciate your help.
Thanks, Martin
Ultidev Team
#2 Posted : Friday, December 7, 2012 7:54:17 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello, Martin.

To tell whether this is an access rights issue, please switch your application to the LOCAL SYSTEM host process. If the problem goes away, then it's a security issue, which you may resolve either by switching to LOCAL SYSTEM account permanently at the expense of making your setup less protected against hacker attack, or moving the code that needs higher access privileges to a ServicedComponent running under a more powerful user account.

Please let us know this information was helpful.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#3 Posted : Monday, December 10, 2012 2:09:18 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Thank you for your answer.
I switched to LOCAL SYSTEM account and the issue was fixed. However another problem appeared:
After moving to the LOCAL SYSTEM account, sometimes some requests started to abort with "Connection reset" status.
For example some images were not loaded. I can't figure out what's wrong. If I switch back to NETWORK SERVICE account everything works just fine. And in addition the page loading time increased to 12-15 sec.
Ultidev Team
#4 Posted : Monday, December 10, 2012 4:14:23 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi!

We are sorry but we can't think if any reason whatsoever why switching to LOCAL SYSTEM would make things slower. The code does exactly the same thing, but is simply wrapped in the host process running under different user account.

Play with it a bit more, maybe it was just a coincidence and the problem is triggered by something else.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.