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

Notification

Icon
Error

Write access to file system
bwoodworth
#1 Posted : Thursday, March 14, 2013 7:02:19 PM(UTC)
Groups: Member
Joined: 2/4/2013(UTC)
Posts: 3
Location: California

My web application requires that I write log files to the windows file system outside of where the application is located. When I attempt to do that I get an error stating that there is some kind of access violation. Is it possible to give UltiDev access to write files outside of the application directory? If so, is it possible to configure this on application registration?
Ultidev Team
#2 Posted : Friday, March 15, 2013 9:31:25 AM(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 there.

There are several ways of doing this.

Simple but less secure is to register your application with the host that is running under "Local System" user context. That is almost like an administrator access. The downside is that if your application is hacked and taken over, the attacker has complete control over the host machine. This option is not suitable for Internet-facing applications.

A better but more complex way of doing this is to use a ServicedComponent and place the logic that needs higher privileges in the ServicedComponent. ServicedComponent is hosted in a separate process and therefore can run under higher-privileged user account. This solution is more webserver-independent, as it will work well for UWS and IIS.

You may also consider writing data to App_Data folder to which UWS grants access to "Network Service" user - a default context for UWS applications.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
bwoodworth
#3 Posted : Friday, March 15, 2013 12:48:38 PM(UTC)
Groups: Member
Joined: 2/4/2013(UTC)
Posts: 3
Location: California

Thanks! The first option works for me since my application is only for internal LAN use. I am installing UltiDev with an NSIS installer with the following command:

ExecWait '"$PROGRAMFILES64\UltiDev\Web Server\UWS.RegApp.exe" /r /AppId={my-app-id} /path:"$INSTDIR\Plugins\Web Server\wwwroot" "/EndPoints:http://*:8081/" /ddoc:default.aspx /appname:"My Application Name" /clr:4 /vpath:"/"'

Is there a command line argument I can use to to set the application to run as Local System?
Ultidev Team
#4 Posted : Friday, March 15, 2013 10:39:09 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,

It would be /apphost=SharedLocalSystem. All arguments are listed here.

Please let us know if 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
#5 Posted : Friday, March 30, 2018 10:36:51 PM(UTC)
Groups:

Message was deleted by a Moderator.
Rss Feed  Atom Feed
Users browsing this topic
Guest (3)
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.