So we decided to try out the new Windows Server 8 / IIS 8.
Running in VS-Dev server I simply catch all server errors in Application_Error() in Global.asx and log these using log4net.
Now I have 2 problems, first is the exceptions doesnt seem to be caught in Application_Error() on our deveolpment server (as the server returns a statuscode of 500 to the browser).
Second is that my log4net doesnt log anything from the Webapplication.
Its a mvc 3.0 asp.net application using razor views.
My local machine is running Windows 7 / VSUltimate 2012.
Trust-level set to Full and the IIS_IUSRS usergroup have full access to the folder where im trying to write the log-files.
What I really want is to just log the exceptions somewhere so if theres a built in way of doing this in IIS 8 please let me know. (Maybe redirect to some error controller which gets the exception as a parameter?)
Cheers Tomas
I'm having a very similar problem after upgrading to Windows Server 2012 / IIS 8.
The exceptions are being added to the Windows event log. Open Event Viewer from the start menu, expand Windows > Application on the left and look for events in the "Web Event" category.
On our server the following change fixed the problem:
In IIS Manager, go to ".NET Error Pages", then on the right choose "Edit Feature Settings..." and change Mode to either On or Remote Only.
Related
We have a laravel app (Version 5.5*) deployed in WIndows Server 2012 R2. But our development stack is LEMP. Same codebase works fine in development STACK but fails in WINDOWS SERVER.
Problem:
In our App, there is a REPORT DOWNLOAD queueable job which reads data from database table and generates an excel file using box/spout package(version 2.7) depending on user input date range (daily,weekly,monthly, etc) .
When running the queue:work command from cmd as administrator,
$writer->openToFile(‘path/to/file’) throws an error : failed to open stream : no such file or directory.
See this image for code snippet throwing error
Solutions I tried:
Setting right permissions(full control Read & write) for Storage folder of my project (For Users, IIS_IUSRS,IUSR)
Setting right permissions(full control Read & write) for C:windows\Temp folder (For Users, IIS_IUSRS,IUSR)
Created symlink for storage folder inside public
FYI:
OS: windows server 2012 r2
PHP: 7.2*
Laravel: 5.5.*
box/Spout package: 2.7.*
** AT LAST GOT THE SOLUTION AFTER GOING THROUGH ANSWERS OF OTHER QUESTIONS RELATED TO THIS PROBLEM **
You can follow the following procedure:
Go to IIS Manager
Select your desired project (For example: myexampledomain.com) listed under Sites
Go to Security tab and you'll see the users listed with their permissions on the folder.
Now, click Edit button to go to a new window and click Add. In the text box,type IIS AppPool\MyApplicationPoolName.In our example it should be IIS AppPool\myexampledomain.com.
Click Check Name and you'll see the test change with underline.
Click Ok. Add the appropriate permission(Modify,read,write) to the newly created user.
That's it!!!
Thanks to all for responding.
I just configured my Visual studio 2010 with IIS express 8.0. It works perfectly but in case of any error in my code it is showing me crash page in encrypted format (Meaning - It shows full of boxes and some special characters). So every time i need to go event viewer to check the issue. Can you please help me in this?
This is how the message looks:
��I�%&/m�{J�J��t��$ؐ#�������iG#)���eVe]f#�흼��{����{����;�N'���?\fdl��J�ɞ!���?~|?"��Ey�')=��y6�����h���8]�����u]���u�-�������Gi[,�ߪ�?��WZ4i���uQ��t������>z��YQ6�Ҽ������S����YQ���|9+�O�f �ϫly�����A���U��?�_�������������������w�n<=>9��ypzr��/�:�]�W�b]f�/\N���ٲ%����G�(Eӏ�b���(��>�� 1~�]/����K���=^����Xe���1��Y����2�6�u�A:�f��/>����y�(��G�d^ϲe��!z���ђh���QS� �����iUV��I�M���ԃ�z�>�EV_���Z=J���������T���������f�����Z�s���� �-H¸���U�w�|=-fYzR-�������|��<&�o�Z()*�S!U��k�g����o��j��.�_�/^��u�/��J�Iն��Q���z�i�n�-gل���ݞ��Y^����H�8/���CMC� ԡO��w}V|W���\?�#�}t5/��#����G���{�:�iܩU(��8=^��b�؎��������vwv~���ٮ��YS���������|�(}\�l������-��b{4��3�y���4�������Q���آ%������~�^/g�f�U~AT$D���uq�F�sr�>͛i]�DVߝ/���P���i�ߥՔ�������2o����f�19h���|E�n��;������}x��:I~��e���N��5�ϑ�I~�h�}��JV>ͧ��f,x��'.���ﶮʒ�b�N�I�5���>ْ_2K4�*�s��9$r��U������M�Hw�ӺZ���C����{������lIf.?c3��wg<|���ϧ�t ��wgD�������{�h��o�-��fE/���(����#��Q���lY��9nɖ�
I just resolved the issue. Initially my application was working in integrated mode. I tried it with classic app pool and it started showing the real error message :-)
I have been trying to set up RocketSVN server on win server 2008 R2 and the plug in client for Visual studio's 2010 but have been have a lot of trouble so will list what i have had issues with and what i did to get them working and where i am up to.
First I was having trouble connecting to the server through a browser which came down to the fact that i hadn't installed the Basic and windows Authentication on the server IIS features Doh! (fresh install :)) although it still didn't work until i went through the windows updates, After these steps i could connect to the Admin portal through a browser add add repositories and users yay!
Then i moved on to the Visual Studio's plugin and was having trouble being authenticated while trying to add or open a project from svn so back to Google and found a solution here http://community.axosoft.com/forums/thread/22088.aspx but was not using windows authentication which i wanted and was now getting another issue, I found that changing the binding in the IIS to HTTPS and setting a certificate let me use windows authentication and got me to the same position but now I'm stuck again....
tried to add images but wont let me Grrrr.... Edit : I can add images now :)
every time i try to add a solution i don't get a folder to save it to and the "Create Folder" button is greyed out all i get is the
Subversion Repositories
https://<server name>:8080
so am missing the svn/testrep/(testrep being my repository) folder to select and add my solution to..
I am using the repository URL found on the admin portal..
The error i get if i try and open a solution (even though i don't have any solutions in the repository i thought i might be able to browse it?) is
"server sent unexpected return value (405 not allowed) in response to propfind"
i hope some body can help me with this as I'm losing the will to live with this one :( i thinking its still a server set up issue but cant find any more info let my no if any 1 wants to see any server logs / config's / settings.
Cheers in advance
I have recently tried to install TargetProcess http://www.targetprocess.com/ on my windows machine, which involves installing IIS and an instance of SQLEXPRESS.
I have no previous with IIS so most to the concepts where new to me. After much head scratching and tinkering I managed to get TargetProcess to install. However when I try to run it in a browser I get teh following error
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
The page I am trying to run is .aspx and I have run a page.aspx to verify that .aspx are not being restricted as suggested by the error message.
Anyone got any ideas as to what else it could be?
Kevin,
In the IIS management console, please open ISAPI and CGI Restrictions feature fro your hosting server. ASP.NET v2.0 and v4.0 restrictions are set separately. TargetProcess application is using .NET v4.0 since 2.22.9 build, so please check, that MS .NET framework v4.0 is installed and ASP.NET v4.0 is allowed. Also on the Handler Mappings section for TP web site PageHandlerFactory-ISAPI-4.0 should be enabled.
Please contact us via http://messenger.providesupport.com/messenger/targetprocess.html if you need any assistance.
Regards, Alex - TargetPro
To solve:
1.- Go to IIS manager and clic on your server name (when tooltip says localhosts)
2.- double clic on ASAPI and CGI restriction
3.- right clic to change all items to ALLOWED
The "ISAPI and CGI Restrictions" option was not there on my machine. I had to go back into the "Turn windows features on and off", then the "Internet Information Services" / "World Wide Web Services" / "Application Development Features" and then ticked the "CGI" option. Once I did this, the "ISAPI and CGI Restrictions" option appeared after I closed and re-opened IIS. Just mentioning it here in case anyone else has the same problem.
I want to debug my application by VS but when the application should run, it should have url like: http:localtesting.com instead of localhost. I already have localtesting.com in my host file so directly putting that url in my browser opens my IIS default directory page. How can I make my VS to run on that url while debugging? Where should I put that url?
Edit:
Putting the url in custom web server textbox and running the solution I am getting :
Set it to "Use Custom Web Server" and put your URL into that box.
Edit: 'The unable to debug..' error message is probably a separate issue. Can you debug a brand new site that you can create just to test?
A few things can cause that error. For example, the URL Rewrite module: Unable to start debugging on the web server. Could not start ASP.NET debugging VS 2010, II7, Win 7 x64
As #SteveHobbs said, set it to "Use Custom Web Server and put your URL into that box. Just underneath that section, there should be another section labelled "Debuggers".
Put a tick into the checkbox next to ASP.NET and save the properties.
When you want to debug, go to the debug menu within VS and choose "Attach to Process...".
If you are using IIS, look for the process called 'w3wp.exe' and choose that. After a bit of crunching, perform whatever actions you need on your web app and you will see the debugger land on your breakpoints and so on.