Issue in deploying website with .srf files on IIS - windows

I am facing an issue in deploying website with .srf files on IIS. Getting an isapi module error. Installed asp.net, extensibility, CGI and ISAPI restrictions as required.
HTTP Error 500.0 - Internal Server Error
There is a problem with the resource you are looking for, so it cannot be displayed.
Most likely causes:
• The path to the ISAPI Filter is incorrect.
• IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
• IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
• IIS was not able to process configuration for the Web site or application.
• The authenticated user does not have permission to use this DLL.
Detailed Error Information:
Module: IsapiModule
Notification: ExecuteRequestHandler
Handler : TestRemote
Error Code: 0x8007007e
Requested URL: http://localhost:80/TestRemote/Banner.srf
Physical Path D:\wwwroot\Test\TestRemote\Banner.srf
Logon Method Anonymous
Logon User Anonymous

According to your description and error message, it seems there are something wrong about creating mapping for the .srf file.
I suggest you could try to follow below steps to re-add the mapping for mapping between files with the .srf and .dll extensions and the new ISAPI extension DLL.
Steps as below:
1.Generate an ATL Server ISAPI extension DLL using the ATL Server Project Wizard.
2.Build the ISAPI extension DLL and copy it to your Web server.
3.Create a mapping between files with the .srf and .dll extensions and the new ISAPI extension DLL.
For example:
(1)Run Internet Services Manager.
(2)Right-click the appropriate Web site or virtual directory in the tree and click Properties on the shortcut menu.
(3)Click the Home Directory or Virtual Directory property page.
(4)Click the Configuration button.
(5)Click the App Mappings property page.
(6)Click Add.
(7)Enter the path to your ISAPI DLL in the Executable text box.
(8)Enter .srf in the Extension text box.
(9)Click OK.
(10)Click Add.
(11)Enter the path to your ISAPI DLL in the Executable text box.
(12)Click .dll in the Extension text box.
(13)Click OK until all dialog boxes are accepted.

Related

Allow Microsoft symbol server through firewall

We have a new setup where we don't have internet access for our machines which we code on. (Stupid Idea in my opinion). Our Network Security department wants to know if the following URL is the only URL needed to allow firewall access to Microsoft's Symbol server.
msdl.microsoft.com/download/symbols
Is this the same URL that visual studio uses when it goes off and tries to download the needed .pdb files when debugging?
If you navigate to that url you will see you get an HTTP 302 response, which redirect you to another URL depending on what symbol you request for. I hope your firewall supports pattern matching for URLs.
Here is a non exhaustive list i got from my windows server 2016 c++ project
vsblobprodscussu5shard1.blob.core.windows.net
vsblobprodscussu5shard3.blob.core.windows.net
vsblobprodscussu5shard10.blob.core.windows.net
vsblobprodscussu5shard11.blob.core.windows.net
vsblobprodscussu5shard13.blob.core.windows.net
vsblobprodscussu5shard14.blob.core.windows.net
vsblobprodscussu5shard18.blob.core.windows.net
vsblobprodscussu5shard19.blob.core.windows.net
vsblobprodscussu5shard20.blob.core.windows.net
vsblobprodscussu5shard21.blob.core.windows.net
vsblobprodscussu5shard24.blob.core.windows.net
vsblobprodscussu5shard32.blob.core.windows.net
vsblobprodscussu5shard37.blob.core.windows.net
vsblobprodscussu5shard38.blob.core.windows.net
vsblobprodscussu5shard56.blob.core.windows.net
vsblobprodscussu5shard65.blob.core.windows.net
vsblobprodscussu5shard80.blob.core.windows.net
vsblobprodscussu5shard81.blob.core.windows.net

ClickOnce - installing an app gives 'Cannot Start Application' error

I have a simple windows application which I want to distribute through a website which is running on Azure. I publish the app locally first and then manually copy over the artifacts to the web server at location ../fold/apps/tools
Publish location: C:\Users\MyUsername\Documents\publish
Installation folder URL: https://somewebsite/fold/apps/tools/
Update location is same as the installation folder.
The files copied over are "Application Files" folder, Myapp.application, publish.htm and setup.exe.
Now I log onto the website and download the app using https://somewebsite/fold/apps/tools/Myapp.application
Clickling on the downloaded files shows me the 'Cannot Start Application' popup. Clicking on the details button shows the following error in the log file.
SOURCES
Deployment url : file:///C:/Users/MyUsername/Downloads/Myapp.application
Deployment Provider url : https://somewebsite/fold/apps/tools/Myapp.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\MyUsername\Downloads\Myapp.application resulted in exception. Following failure messages were detected:
+ The Deployment Provider specified in the manifest cannot be reached. Maybe due to network error and/or the deployment provider is not responding correctly.
+ Exception reading manifest from https://somewebsite/login.aspx?ReturnUrl=%2ffold%2ftools%2fMyapp.application: the manifest may not be valid or the file could not be opened.
+ DTD is prohibited in this XML document.
I don’t understand why it tries to redirect to the login page when I am logged in. To test I placed a simple text file in the same location as the .application file and was able to access it after logging in.
Please let me know where the issue might be.
Many Thanks
Turns out that 'You cannot use forms authentication with ClickOnce deployment'. See Use ClickOnce on password protected web site.
I ended up opening up the folder to the world by placing a Web.config file with
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
It was OK for me as the windows app doesn't need to be password protected.

WCF not working when debugging in visual studio but works in IE

I have a WCF that is hosted in an ASP.NET application. Suddenly, the WCF service has stopped working when i debug it in visual studio 2010. When i try to access the service, it throws the below exception.
CommunicationException was unhandled by user code. The remote server returned an error: NotFound
I have WCF tracing enabled but no errors are being logged.
The strange bit is that if i deploy the code to my QA server and access the application, the service works fine, so the code looks like not the problem.
If i also get the source code currently running in production successfully & try debugging it in my dev environment, it fails with the same error i mention above.
Any one have an idea what could be messed up in my dev environment?. I have tried both IE, Firefox & Chrome & the results are the same.
I after a very long debugging involving deleting Bin & obj folders and lots of rebuilds, i finally got this WCF service working again.
First, i suspected the service could be corrupted somehow, so i tried to update the service reference in my silverlight application but was bumped with the following error.
There was an error downloading 'http://localhost/mySite/Webservice/GetData.svc'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost/mySite/Webservice/GetData.svc'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
I then browsed to the physical folder path to confirm if really my .svc file was there and indeed as expected, the file was there.
Trying to Browse to the path http://localhost/mySite/Webservice/GetData.svc in my browser bumped me with another error below.
HTTP Error 404.7 - Not Found The request filtering module is
configured to deny the file extension.
Most likely causes: Request filtering is configured for the Web server
and the file extension for this request is explicitly denied.
This made me start thinking that suddenly, IIS 7.0 has decided to block access to my .svc files.
I then added fileExtension=".svc" mimeType="application/octet-stream" to IIS, restart IIS but got the same error.
I then read on some blog i cant remember about adding <add fileExtension=".svc" allowed="true" /> under <requestFiltering> tag in file applicationHost.config located at C:\Windows\System32\inetsrv\Config, still nothing changed. Tried adding <mimeMap fileExtension=".svc" mimeType="application/octet-stream" /> under serverSideInclude in the same file, again with no luck.
Tried this http://www.adamwlewis.com/articles/iis-7-not-serving-files-4047-error still with no luck.
The following 2 steps are i think what resolved the issue.
I added a mapping for the SVC extension to ASP.NET by running ServiceModelReg.exe -i from C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation
Browsed to my .svc file in the browser and this time it looked like i had made some progress but still, i had one more error to overcome . The is bellow.
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
I resolved the above error by registering the correct version of ASP.NET using the ASP.NET IIS Registration Tool (aspnet_regiis.exe,) as described in the link below
https://msdn.microsoft.com/en-us/library/hh169179(v=nav.70).aspx
At this point my service was back to normal as it had always been. I still haven't figured out what messed up my development machine.

Cannot debug ASP website on IIS 6.1

I am new to our company and just trying to set up my workstation. We have an ASP website I am trying to debug in Visual Studio 2010. In the "Web" section of the project properties we have the "Use Local IIS Web server" option selected, however when I try to debug the page I'm working on I get the error "Unable to start debugging on the web server. See help for common configuration errors." I can see the site in IIS (Under Sites -> Default Web Site -> SiteImWorkingOn), and both IIS and the VS project are using .NET 4.0. Any suggestions?
EDIT: I should mention that I've run the "aspnet regiis -i" command in the command prompt to make sure IIS was running .NET 4.0
SECOND EDIT: I found that ASP.NET was not turned on, after doing this I am getting the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x8007000d
Config Error
Config File \\?\C:\Projects\sym_Periscope_NEAL\Periscope\Web\web.config
Requested URL http://localhost:80/Periscope/Pages/Dist.aspx
Physical Path C:\Projects\sym_Periscope_NEAL\Periscope\Web\Pages\Dist.aspx
Logon Method Not yet determined
Logon User Not yet determined

allowDefinition='MachineToApplication' - MVC3 ERROR

I'm developing an application in MVC3 (http://www.colombiatrolley.com/sitrolley). In my computer it runs correctly, but when I upload it to the server (a hosting service) I get this error:
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
I know it is a very common error but I have not fixed it yet.
Some config sections are only allowed at the "root" of the application, then authentication section is one of them.
You need to configure IIS to run your your site as an application, not a sub-directory in an existing application.
For IIS 7+, right click the directory that contains your web application, and select "Convert to Application".
EDIT:
Arie van Someren is right. Looking carefully at your error, you want the <authentication> configuration to be in the web.config one level up, not the web.config in Views.
I had the same problem. I solved it by deleting the obj folder that appeared after doing a "Build > Publish".

Resources