I have an issue that I need to restart the IIS when my page for generating a crystal report through exe (vb.net). The user says sometimes the exe is abe to generate the report but sometimes cannot. This is being resolved when doing IISRESET in the server.
Any one have an idea what's going on with my exe. Thanks!
IMO, you shouldn't be executing any exe from a solution hosted on IIS. Obviously, it is not working out for you, and it is blowing out the ASP.NET Worker Process thread that is servicing the App Pool that is hosting the Web applications -- blowing the thread
out to the point that an IIS reset must be done bringing down the entire Web server. Bringing down the Web Server for something doing a report?
Maybe, you need to figure out how to use Crystal Reports in a Web application scenario., which also can be done, and not as a desktop solution being called from a Web solution that are two different environments.
What you have is not a viable solution, and it should be abandon IMO.
"classic" what ? This is a C# console app ? What are you doing if you have an error when running this exe file ? For now my guess is that an exception happens when running the EXE file (for example because the same file name could be used at the same time
by multiple users) and if you have an exception the very first step should be to start from the actuel exception message you have...
Thanks for your time. The exe to generate a report is written in vb.net, the web page is also a vb.net. (I corrected the description, sorry for that) The page just returns - "Error while executing exename.exe". I can't find the actual exception message
even in the windows log event I can't find anything.
Thanks for your time and additional info regarding IIS. The web page is still accessible and the other pages, it's just that we receives "error on executing exename.exe" on the page whenever the generation of report is triggered on the page calling exe file.
Thanks for you inputs I will check on that. Thank you very much.
And this message comes from ? If this is a custom message or ex.Message make sure to still use ex.ToString() to log full exception details somewhere to first understand what is the exact error that happens.
Not direcly related but as this is .NET code it seems it could be included directly as part of your web app (or as a DLL) rather than as a separate EXE file.
The web page is still accessible and the other pages, it's just that we receives "error on executing exename.exe" on the page whenever the generation of report is triggered on the page calling exe file.
And it eventually forces an IIS reset, because it shouldn't be done. You need to implement a Web solution for the Web application and not a desktop solution for the Web application.
Crystal report will generate the temp file to Windows temp folder;
Then the system buffer folder is full and needs to be cleaned regularly.
With regards, Angelina Jolie
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
22 Points
66 Posts
Exe fails when calling from IIS
Jan 22, 2018 10:00 AM|Nusij03|LINK
Hi Everyone,
I have an issue that I need to restart the IIS when my page for generating a crystal report through exe (vb.net). The user says sometimes the exe is abe to generate the report but sometimes cannot. This is being resolved when doing IISRESET in the server.
Any one have an idea what's going on with my exe. Thanks!
Thanks and best regards,
Nusij
Participant
1161 Points
1259 Posts
Re: Exe fails when calling from IIS
Jan 22, 2018 10:43 AM|DA924|LINK
IMO, you shouldn't be executing any exe from a solution hosted on IIS. Obviously, it is not working out for you, and it is blowing out the ASP.NET Worker Process thread that is servicing the App Pool that is hosting the Web applications -- blowing the thread out to the point that an IIS reset must be done bringing down the entire Web server. Bringing down the Web Server for something doing a report?
Maybe, you need to figure out how to use Crystal Reports in a Web application scenario., which also can be done, and not as a desktop solution being called from a Web solution that are two different environments.
What you have is not a viable solution, and it should be abandon IMO.
All-Star
40160 Points
12995 Posts
Re: Exe fails when calling from IIS
Jan 22, 2018 10:46 AM|PatriceSc|LINK
Hi,
"classic" what ? This is a C# console app ? What are you doing if you have an error when running this exe file ? For now my guess is that an exception happens when running the EXE file (for example because the same file name could be used at the same time by multiple users) and if you have an exception the very first step should be to start from the actuel exception message you have...
Member
22 Points
66 Posts
Re: Exe fails when calling from IIS
Jan 22, 2018 11:44 AM|Nusij03|LINK
Hi PatriceSC,
Thanks for your time. The exe to generate a report is written in vb.net, the web page is also a vb.net. (I corrected the description, sorry for that) The page just returns - "Error while executing exename.exe". I can't find the actual exception message even in the windows log event I can't find anything.
Member
22 Points
66 Posts
Re: Exe fails when calling from IIS
Jan 22, 2018 11:47 AM|Nusij03|LINK
Hi DA924,
Thanks for your time and additional info regarding IIS. The web page is still accessible and the other pages, it's just that we receives "error on executing exename.exe" on the page whenever the generation of report is triggered on the page calling exe file.
Thanks for you inputs I will check on that. Thank you very much.
All-Star
40160 Points
12995 Posts
Re: Exe fails when calling from IIS
Jan 22, 2018 12:02 PM|PatriceSc|LINK
And this message comes from ? If this is a custom message or ex.Message make sure to still use ex.ToString() to log full exception details somewhere to first understand what is the exact error that happens.
Not direcly related but as this is .NET code it seems it could be included directly as part of your web app (or as a DLL) rather than as a separate EXE file.
Participant
1161 Points
1259 Posts
Re: Exe fails when calling from IIS
Jan 22, 2018 07:26 PM|DA924|LINK
The web page is still accessible and the other pages, it's just that we receives "error on executing exename.exe" on the page whenever the generation of report is triggered on the page calling exe file.
And it eventually forces an IIS reset, because it shouldn't be done. You need to implement a Web solution for the Web application and not a desktop solution for the Web application.
Contributor
5200 Points
2307 Posts
Re: Exe fails when calling from IIS
Jan 23, 2018 06:45 AM|AngelinaJolie|LINK
Hi Nusij03,
Here are the 3 solutions.
private void Page_Unload(object sender, EventArgs e) { ReportDocument(Youreportobject).Dispose(); }
Reason:
Crystal report will generate the temp file to Windows temp folder;
Then the system buffer folder is full and needs to be cleaned regularly.
With regards, Angelina Jolie
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.