Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Com server called from asp.net webservice credential pro
Message
 
À
15/07/2009 17:46:35
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01412591
Message ID:
01412818
Vues:
62
This message has been marked as the solution to the initial question of the thread.
You can retrieve the account a Web app/service is running under easily with:
[WebMethod()]
public string GetUserName()
{
   return Environment.UserName
}
or in an ASPX page:
< % = Environment.UserName %>
By default this will be NETWORK SERVICE (or ASPNET on XP/Win2000) and this account has no rights to network resources.

If you need network access you'll need to change the service account running the ApplicationPool (IIS 6/7). Create a new ApplicationPool and change the Impersonation Identity for the application pool. Then map this application pool to your site or virtual directory that holds the application.

+++ Rick ---

>I have an ASP.Net web service I'm developing. It calls a COM server written in VFP9 to do backend work. The com server runs fine tested separately. The error I get says a file does not exist on a network drive share, and I expect its because the credentials the web service is running under don't have access to the network.
>
>Can anybody walk me through fixing the account a web service runs under to have network access?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform