user175084
user175084

Reputation: 4640

how to test my web application on server

i have to test what is happening in the code on the server:

if (impersonateValidUser(userName, domain, password)) 
        {

        }
        else
        {

        }

like where is the code going after checking the condition

Should i use a messagebox or some other return way???

I am not sure how to do it

any help... thanks

Upvotes: 0

Views: 68

Answers (2)

Darin Dimitrov
Darin Dimitrov

Reputation: 1039588

This is usually done by logging. Do you use any logging framework in your application such as log4net? If not you could always write to a file by hand:

File.AppendAllText(Server.MapPath("~/log/myapp.txt"), "some message to write");

Upvotes: 1

Marco
Marco

Reputation: 2338

Weird question. If the function is defined, I would guess(or hope) it should return true or false. Whether this is true or false I guess you could determine by just printing a text in each case? Response.Write("true") or Response.Write("false").

Upvotes: 1

Related Questions