A remote service problem

C

crawlerxp

Hi.
This is the problem:
I need to construct an UI asp.net web application that will be able to start
and stop game servers on a dedicated game server.
I came up with an idea to make the server serve asp.net web form application
that will be able to just run game servers and stop those using
System.Diagnostics.Process class and it's methods.

Well, I tried it using C# win32 desktop application - it worked just fine.
But if I try to do it using asp.net web form, the process is started under
aspnet account and I can't see it's window. I just can confirm it is running
by using task manager.

Well. First: is the game server I ran that way available just byusing ip and
port like if it was ran manually using remote desktop?

If it is, that's ok, but if not.. is there any way I could force the asp.net
web app to run the game server under local logged-in account so it is
available normaly?

I've read something about impersonation, but it seems it does not do the
trick.


Thanks for all help.
 
G

Guest

There are couple of things you can do

1) If the webserver is running the only your web application, you can configure it to run under the User Account. You can modify the machine.config file to make ASP.NET work under your specified User Account rather than use its own User Account.
2) If you start the Game Server within ASPNET Process it will be available at the given IP and Port, unless the ASPNET windows account does not have the necessary permissions. You can check to see if the ASPNET account has the permissions your server needs in order to execute.

Regards,
Saurabh Nandu
 
C

crawlerxp

Yep. It's ok now.

Well, now I have a problem. I would like to really run that apps under
loggedin account.

Where to change that? I didn't find the option in any of control panel\admin
tools tools.

Thanks.

Saurabh Nandu said:
There are couple of things you can do

1) If the webserver is running the only your web application, you can
configure it to run under the User Account. You can modify the
machine.config file to make ASP.NET work under your specified User Account
rather than use its own User Account.
2) If you start the Game Server within ASPNET Process it will be available
at the given IP and Port, unless the ASPNET windows account does not have
the necessary permissions. You can check to see if the ASPNET account has
the permissions your server needs in order to execute.
 
G

Guest

Locate the machine.config file in the [ C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG ] directory and open it in notepad.

And search for the processModel node and change the userName attribute to the username of the account you want ASP.NET to work under. Once thats done reboot the machine to ensure the changes take effect correctly.

Please work on this file with caution, better back it up before making changes!

--
Regards,
Saurabh Nandu
Master C#, the easy way...
[ www.MasterCSharp.com ]
 
C

crawlerxp

Thank you very much. You've been of help!

:)


Saurabh Nandu said:
Locate the machine.config file in the [
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG ] directory and open it
in notepad.
And search for the processModel node and change the userName attribute to
the username of the account you want ASP.NET to work under. Once thats done
reboot the machine to ensure the changes take effect correctly.
Please work on this file with caution, better back it up before making changes!

--
Regards,
Saurabh Nandu
Master C#, the easy way...
[ www.MasterCSharp.com ]



crawlerxp said:
Yep. It's ok now.

Well, now I have a problem. I would like to really run that apps under
loggedin account.

Where to change that? I didn't find the option in any of control panel\admin
tools tools.

Thanks.


configure it to run under the User Account. You can modify the
machine.config file to make ASP.NET work under your specified User Account
rather than use its own User Account. available
at the given IP and Port, unless the ASPNET windows account does not have
the necessary permissions. You can check to see if the ASPNET account has
the permissions your server needs in order to execute.
 
G

Guest

You can use the identity element in the web.config file to set the identity under which asp.net runs. You simply set the userName and password attributes to an existing user and the process will run under that user. You also have to set impersonation to true.

If you are using Windows Server 2003, you have support to add this info into the registry instead of having it in plain text.

hope this helps,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top