简体   繁体   中英

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

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") .

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");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM