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

Notification

Icon
Error

Running web as current user
gljubojevic
#1 Posted : Monday, March 7, 2011 12:27:53 AM(UTC)
Groups: Member
Joined: 3/7/2011(UTC)
Posts: 1

Hi,

I have searched forum but I couldn't find an answer how to run web under Cassini as currently logged user.

I have created setup for my web application, and added Cassini as prereq.
Everything installs fine, and application is registered.
Cassini is running as service under system account.

My requirement is to have per user on system specific web app settings.
I did this using XML stored in users application data.

When I run app from VS, everything works because it is run with current user.
But when run from cassini app is run as local system account.

I have tried adding <identity impersonate="true" /> to web.config without success.

Would it be possible to run my web app as currently logged user under Cassini and how?

Thank you!

Goran
Ultidev Team
#2 Posted : Monday, March 7, 2011 6:07:53 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)
Hello, Goran.

Current version of the Cassini web server does not support Windows authentication, but the upcoming new one will. For now your application will not get client user's identity if served by Cassini running as a service. Forms authentication would be the only possibility for now. As for how to store user-specific, you may certainly store data in user-specific profile folders, but if a remote user accessed your application, the server may not even have the profile folders created for the user, and creating a profile on the machine could be pretty time-consuming and taking up quite a bit of disk space.

If you don't plan to provide remote access to the application, then you probably want to run Cassini as an interactive EXE, in which case Cassini will run as currently logged-in user instead of as a service and it will have complete access to all user's folders. In this case the identity of user will be determined no by the user identity of the browser, but the user identity of the server.

Exe to run is:
"C:\Program Files (x86)\UltiDev\Cassini Web Server for ASP.NET 2.0\UltiDevCassinWebServer2.exe"

Code:
Usage:

UltiDevCassinWebServer2.exe /run <PhysicalAppFolder> [<defaultDocument>] [<port> | 0] [<browser path> | nobrowser]

UltiDevCassinWebServer2.exe /register <PhysicalAppFolder> [<AppGUID>] [<defaultDocument>] [<port> | 0] [/DontKeepRunning]

UltiDevCassinWebServer2.exe /unregister <AppGUID>

Commands:
/run - launches stand-alone (unregistered) ASP.NET application under Cassini server.
/register - registers an ASP.NET application with Cassini.
/unregister - unregisters an ASP.NET application from Cassini.


You will probably have to use "nobrowser" option because browsers nowadays merge processes when there is another instance of the browser, making Cassini think the browser failed to start.

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.