HTTP Error 404.3 - Not found - The page you are requesting cannot be served because of the extension configuration - wcf

HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
what could be the reason of this error for the WCF service hosted on IIS 7.

Answered here
Please make sure you've activated WCF components from here.
Or alternate and easy way is, go to control panel -> Turn Windows feature on or off -> and make sure you've all the options ticked as mentioned in below screenshot.
Run from cmd:
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

All you need to do is enable HTTP Activation and any other features that are required for HTTP activation.
For Windows Server 2012,Go to server manager, on the dashboard --> click on Add roles and features. In the Wizard window that opens choose the appropriate server and go on clicking next until you are on the features selection page.
Depending on the version of .NET framework in use on your server you have to check HTTP Activation under WCF Services and proceed to install it. This should resolve your issue.

Run Visual Studio 2008 Command Prompt as “Administrator”.
Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
Run this command servicemodelreg –i
Thanks for the blog from Rahul.
http://blogs.msdn.com/b/rjohri/archive/2009/06/29/the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configuration.aspx

Related

Cannot run published website that using database

I started to code my new website using ASP.net core
Everything runs properly with development environment: Open VSCode and F5 to run.
But after i publish all of them to IIS, it runs with 404 error
This localhost page can’t be found No webpage was found for the web
address: https://localhost:1111/ HTTP ERROR 404
The error page is displayed when the page connects database to runs backend actions.
Any actions in published web that don't use database such as href to another link, run javascript validation, ... would run with no 404 error
Do I miss anything or make something wrong?
here're the steps that i did to publish my site
open terminal and run dotnet publish --configuration Release
copy publish folder in bin\Release\netcoreapp2.2\publish to the publish folder in IIS setting
open IIS and add application pool with .net CLR version is No managed code
add website with application pool above, bind type is https, hostname is localhost, and tick all 3 checkboxes (Require server name indication, Disable HTTP/2, disable OCSP Stapling), SSL certificate is IIS Express Development Certificate
I forgot the page that guided me those steps
I myself have found the cause. The reason that the web app return a 404 page when I post something to backend to process database is I used windows authentication in my database connection string. So it couldn't access the database when I publish to IIS. When i change connection using sql server authentication, it works properly

GeoDesic Buffers sample code does not work in my local IIS Server

I am new to use ArcGis Api for javascript, I am using JS Api 3.20.
I have been trying for 3 days but it does not work.
I have taken code from the following link
Geometry Engine - Geodesic buffers | ArcGIS API for JavaScript 3.20
I paste this in My Html file create in VS website for .Net , and setup a local server for my page using IIS server
I also downloaded proxy from GitHub resource-proxy/DotNet at master · Esri/resource-proxy · GitHub
setup it in same application in IIS
Downloaded excel file added in my application from https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv
but still I am getting the following error in console using developer mode when set Proxy URL to this
config.defaults.io.proxyUrl = "/192.168.8.188/Proxy/proxy.ashx";
GET http://192.168.8.188:1555/192.168.8.188/Proxy/proxy.ashx?http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv 404 (Not Found)
and when I set proxy url to this
config.defaults.io.proxyUrl = "/Proxy/";
then the following error occurs in console
GET http://192.168.8.188:1555/Proxy/?http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv 403 (Forbidden)
Could you please help me out. I would be thankful in advance.
I Resolved My Issue thanks.
Basically I didn't enable IIS 4.5 web features so I read readme file of proxy which resolved my issue.
Here is what I read from ReadMe file located in DotNet folder of Proxy
Troubleshooting: If you get an error message 404.3, it's possible that ASP.NET have not been set up. On Windows 8, go to "Turn Windows features on or off" -> "Internet Information Services" -> "World Wide Web Services" -> "Application Development Features" -> "ASP.NET 4.5".
First off, try setting the proxyUrl value to this:
config.defaults.io.proxyUrl = "/proxy/proxy.ashx";
That may resolve the issue.
EDIT (based on clarification that IIS is in fact running on port 1555):
You might want to confirm that you can access the proxy at all, by entering the proxy url directly in your browser (with no arguments), eg:
http://192.168.8.188:1555/Proxy/proxy.ashx
If this resolves correctly, you should get an error response in JSON format like this:
{error: {code: 400,message:"This proxy does not support empty
parameters."}}
That at least would confirm that the proxy is accessible and functioning properly on your system.

Reference.vb code debugging

When adding a reference to a web service, a Reference.vb file gets generated to make all the service's types available to the hosting project.
When I put a breakpoint in that file it never gets hit. How can I solve this?
If you're using VS2013 you can disable Just My Code in the debugging options.
https://msdn.microsoft.com/en-us/library/dn457346(v=vs.110).aspx
That will make VS ignore the DebuggerStepThroughAttribute that Stephan B mentions. If you're using older version of VS you can delete the attribute from the Reference.vb
See System.Diagnostics.DebuggerStepThroughAttribute for why it never gets hit. Right now I don't know how to tell the Debugger to halt anyway, ignoring the Attribute but you should be able to remove the Attribute from Reference.vb and start your Debug session without VS regenerating the file.
You can try the below steps;
Open the web service project and go to web services project's "My Project".
Go to Web tab.
Choose "Don't open a page. Wait for a request from an external application."
Choose "Use Local IIS Web Server"
Change Project URL: "http://localhost/YourWebService" to your service name.
Click on "Create Virtual Directory".
Set the breakpoint at desire location.
Debug Run the web services "F5".

WCF Test Clinet - Can't Edit Config File

We are currently experiencing an issue that requires the client endpoint configuration file to be modified but can't find a way to do this in the WCF test Client. Is there a way to modify the Config file in the WCF Test Client?
I have read that you should be able to right click and select edit but this option is not available.
Running Visual Studio 2008 (without SP1 - please don't ask why)
To edit the client config in WcfTestClient, right click on the Client Config below the listed service and select "Edit with SvcConfigEditor". Is the "Edit with SvcConfigEditor" greyed out or missing when you right click on Client Config?
Here is a link on more information about WcfTestClient for .Net 3.5: http://msdn.microsoft.com/en-us/library/bb552364(v=VS.90).aspx
Update
The "Edit with SvcConfigEditor" is added in SP1, but you can try the following to make manual changes:
From http://social.msdn.microsoft.com/forums/en-US/wcf/thread/dde72fbe-e741-48fd-a9e1-253800d5227a/ Herve Roggero suggested this:
Well, I was facing a similar challenge. There is a manual way to do this until the tool gets updated.
Start the client interface (WcfTestClient.exe) with the WCF Service HTTP
Expand the service and right-click on the Web.Config (do not double-click - this will load the config file)
Click on Copy Full Path
Go to the file and edit the configuration sections you need to change (buffer limits, dns identity for https...)
You can now start using the tool with a modified config file.
Unfortunately everytime you restart the tool a new config file gets generated in a different folder. So this is a manual step. Still it helped me test an HTTPS endpoint that required changing the config file.
Hope this helps

Deploy WCF REST 4.0 to XP IIS 5?

I am trying to deploy a simple "Hello World" .NET 4.0 REST-style WCF service on WinXP (IIS5). It works fine in Cassini.
I tried to adapt the info here to me:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
but something is not clicking. Can anyone lend ideas or comments? Yes, I must stay with WinXP.
Thanks.
After a fair amount of struggling I was able to successfully deploy a WCF 4.0 REST web service on XP/IIS5. For the benefit of you and others in the same situation, here's what I did (let me know if you need more detail):
Using VS 2010, build a deployment
package for the project and then
install it on the target machine
(your web server). The following
link will show you how to do this: http://vishaljoshi.blogspot.com/2009/03/web-packaging-installing-web-packages.html
Make sure that your virtual directory in IIS is configured to use .NET 4 (right click on virtual directory > properties > ASP.NET tab > ASP.NET Version)
Configure your virtual directory to support extensionless requests (i.e. your REST API) by creating a wildcard mapping (right click on virtual directory > properties > configuration > mappings tab) with the following properties:
Executable: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
Extension: .*
Check that file exists: unchecked
(Note: watch out for the bug that keeps the "OK" button on this dialog grayed out. To get around this just click in the executable textbox after entering your extension and the "OK" button should get enabled).
If you get an authentication error when accessing the service then turn off integrated authentication on the virtual directory. This should fix the problem if you have used the defaults in the generated web.config of your service. If you have explicitly modified the authentication mode then you will have to adapt accordingly.
Have you considered self-hosting your service instead of trying to use IIS. That will probably be easier to do than use IIS.
In case above steps dont work. There could be a problem with permissions on your App pool for that website / virtual directory , you can try to set that right and try it out.
You can refer this article for more help on this.
http://technicalwizardry.blogspot.in/2013/04/wcf-rest-service-hosted-on-iis-5.html#!/2013/04/wcf-rest-service-hosted-on-iis-5.html