Check the java website is available or not using C# -


i want program in c# check if website online or not. have done asp.net website , working successfully. jsp https protocol not working , throwing 500 internal error. below code using

    httpwebrequest request =(httpwebrequest)httpwebrequest.create("https://xyz/abc/temp.jsp");          request.credentials = system.net.credentialcache.defaultcredentials;         request.method = "get";         httpwebresponse response;         try         {             response = (httpwebresponse)request.getresponse();         }         catch (exception ex)         {             response = null;         }         if (response == null || response.statuscode != httpstatuscode.ok)         {             return false;         }         else         {             response.close();             return true;         } 

error : [system.net.webexception] = {"the remote server returned error: (500) internal server error."}

can 1 me how can perform java website https protocol.

thanks in advance.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -