[Solved] Response.Write not working in IIS in ASP.Net

rakibxl
 
on Aug 30, 2018 07:47 AM
7723 Views

I have a page where if i upload pdf file wrong then error that coming from store procedure is coming correctly when it is in the localhost.But if i upload in the production the error message is saying that internal server error instead it should say for example the customer is wrong. Any idea?

If ReturnMessage <> "OK" Then
    context.Response.ContentType = "text/plain"
    context.Response.Write(FileName + " " + ReturnMessage)
    context.Response.StatusCode = 500
Else
    context.Response.ContentType = "text/plain"
    context.Response.Write(FileName + " " + dbResources.label.DocumentCreatedSuccessfully)
End If

in the return message the error is coming properly as the idcustomer is wrong and showing me an alert with that message in the local host it is working fine. but in the production it is not giving me message idcustomer is wrong

Download FREE API for Word, Excel and PDF in ASP.Net: Download