Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging ASP.NET application at run-time
Message
De
16/01/2009 13:12:22
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01374333
Message ID:
01374431
Vues:
15
>>>>>>>Hi,
>>>>>>>
>>>>>>>In order to figure out a problem I am having with an ASP.NET application on customer site I need to check if the application reaches a few points/conditions. Ideally I would like to insert a code in those places to create some dummy/token files. This way I can see if the point had reached or not. But my understanding of ASP.NET is that it is not allowed to make files on the server.
>>>>>>
>>>>>>>Any suggestions of how to get/create files to debug at run-time?
>>>>>>
>>>>>>Hi,
>>>>>>As long as the account that ASP.NET is running under has the neccessary permisions set in the OS you should not have problems writing to file.....
>>>>>
>>>>>I found that File.CreateText() is easy enough method to create a simple text file. So far it works on my PC. Next thing I will be testing it on the user server.
>>>>
>>>>If you are using the ASP.NET Development Server then it probably would work - whether it will work on the production server as-is is a very different matter. What is the IIS /OS version on that machine?
>>>
>>>The server is Server 2003 R2. So far, I am not able to make my application to create sample text file. I don't know if I am doing something wrong or this is just not allowed on the server.
>>
>>PMFJI, another possibility is to write to the event log:
>>
>>
>>Dim myEvent As EventLog = New EventLog
>>
>>myEvent.Log = "Application"
>>myEvent.Source = "MyAppName"
>>
>>myEvent.WriteEntry("My message here", EventLogEntryType.Information)
>>
>
>Thank you, Bruce. Let me ask you, where would I see this even log? I want to try it on my PC first.

You the Event Viewer. On Windows XP it is here...

Control Panel > Administrative Tools > Event Viewer.

Select "Application"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform