Internal Server Error

S

Stephen

Hi,
I am using only windows authentication for webpage access (anonymous access
removed) to read a page. I am using this code to read a page and then use
the StreamReader to convert the Page to PDF.

Private Function GetHTML(ByVal sUrl As String) As StreamReader
Dim oReq As HttpWebRequest
Dim oResp As HttpWebResponse = Nothing
Dim lTime As Long = Now.Ticks

oReq = HttpWebRequest.Create(sUrl)
oReq.Credentials = CredentialCache.DefaultCredentials ........ <- I
wonder whether it takes Domain Credentials here
oResp = oReq.GetResponse ........ here <-System.Net.WebException:
The remote server returned an error: (500) Internal Server Error

Dim sr As New StreamReader(oResp.GetResponseStream)
Return sr
End Function

why does this happens? what settings i need to have?
I guess I have all the right permissions set, I even have <identity
impersonate = "true"> if i set it to "false", I get insufficient permissions
message.

Please Advice,
Stephen
 
Joined
Sep 7, 2010
Messages
2
Reaction score
0
Problem In Web Service.Internal Server Error

I receive Problem in Web Service :internal Server Error when i click The Link in Grid .
But Web Service works fine.
Pl Help


function CellClick(tableName,itemName, Btn)
{
var column =igtbl_getColumnById(itemName);
var oRow = igtbl_getRowById(itemName);
cnt = oRow.getCell(4).getValue();
StyleId = oRow.getCell(5).getValue();
if(column.Key=="Style")
{
cellobj = igtbl_getElementById(itemName);
cellobj.style.cursor = 'wait';
var x;
if(clickval==0) {
clickval=1;
window.status='Waiting for Page...';
LoadXmlForEncryption(CommonServiceUrl + '/common.asmx/GetEncryptString?InputString=' + StyleId);
}
}
}

function LoadXmlForEncryption(url)
{
// branch for native XMLHttpRequest object
//code for Mozilla, etc
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = GetEncryptString();
req.open("GET", url, true);
req.send(null);
// branch for IE/Windows ActiveX version
} else if (window.ActiveXObject) {
isIE = true;
req = new ActiveXObject("Microsoft.XMLHTTP")
if (req) {
req.onreadystatechange = GetEncryptString
req.open("GET", url, true)
req.send()
}
}
}

function GetEncryptString()
{
if (req.readyState == 4) {
if (req.status == 200) {
response = req.responseXML.documentElement;
EncStr = response.getElementsByTagName('OutputString')[0].firstChild.data;
LoadXmlForDocLock(CommonServiceUrl + '/common.asmx/LockEntry?sDocNo=' + StyleId + '&sPrefix=STY&sMisc=' + 'StyleEntry.aspx' + '&ToInsert=True');
} else {
alert("Problem in Web Service :\n" + req.statusText);
DefaultCursor();
}
}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top