ISAPI error when installing Shibboleth SP with IIS7 - iis-7

i'm currently trying to install the Shibboleth Service Provider on IIS7 and getting the following error from the browser when browsing to
http : // 127.0.0.1/Shibboleth.sso/Status :
Shibboleth Error
ISAPI extension can only be invoked to process
Shibboleth protocol requests.Make sure the mapped file extension
doesn't match actual content.
Here's what i tried so far:
Restarted the Shibboleth 2 Daemon service
Restarted IIS from the interface and using iisreset
Configured shibboleth2.xml with the correct site id and the correct name in the ISAPI tag
<!-- ISAPI Settings. -->
<ISAPI normalizeRequest="true" safeHeaderNames="true">
<!--
Maps IIS Instance ID values to the host scheme/name/port. The name is
required so that the proper <Host> in the request map above is found without
having to cover every possible DNS/IP combination the user might enter.
-->
<Site id="2" name="my_host_name/courses"/>
<!--
When the port and scheme are omitted, the HTTP request's port and scheme are used.
If these are wrong because of virtualization, they can be explicitly set here to
ensure proper redirect generation.
-->
<!--
<Site id="42" name="virtual.example.org" scheme="https" port="443"/>
-->
</ISAPI>
Made sure the Status Handler type contains ::1
<!-- Status reporting service. -->
<Handler type="Status" Location="/Status" acl="127.0.0.1 ::1"/>
Now from IIS
I added the ISAPI shibboleth dll in the ISAPI Filters
Name=Shibboleth
Executable=path/to/shibboleth-sp/lib64/shibboleth/isapi_shib.dll
Entry Type=local
I added the same dll in the ISAPI and CGI Restrictions
Description
Description=[No Description]
Restriction=Allowed
Path=path/to/shibboleth-sp/lib64/shibboleth/isapi_shib.dll
I made sure the hosts files contains the IP and my hostname.
I found some answers from Shibboleth forums with that error but nothing seems to be working.
If i disable the SSO i can browse the /course folder.
I can reach the same page with the error from another computer, not only from the server itself.
Any help would be greatly appreciated.
Thank you!

Which version of the Shibboleth service provider installed. Please Install the latest version 3.0.2.0. and please check the option IIS 7.0 while Installing. We faced the similar issue, after i upgraded to the version 3.0.2.0 it worked for us.

Related

How to point the website to a particular Folder in IIS

I am a beginner in web development. I am not sure how to tell the website to point to a particular folder in IIS. I have ASP.Net MVC - 5 Web Application.
Step 1. Bought a domain/url.
Step 2. Bought a server with IP Address (Windows Server).
Step 3. Pointed the url to the Server's IP Address..
Step 4. Have locally published my webapp code from visual studio. And now I need to paste this code on the server.
Question 1. Now where do I need to put the code in server so that the IIS will host it and anyone visiting that website will hit that folder which has all my website code. I am a beginner please guide me.
Question 2. In future I will put another web site code too on that same server, let's say the URL for new web app is xyz.com. How to tell xyz.com to go to the other folder dedicated for it, and not the older one. Basically, How multiple web site hosting will work?
PS: using remote desktop client. I am able to log in to my windows server.
In IIS, by default one site is created which points to "%SystemDrive%\inetpub\wwwroot" and it has a default HTTP binding where it listens to all incoming requests on PORT 80.
Now in your scenario, you have several options. You can either create a new site and point it to the folder where your published code resides or you can edit the existing site configuration to point to the folder where your app resides. Below instruction is to edit the exiting site configuration:
Launch IIS Manager
Right click the Default Web Site and navigate to Manage Website > Advanced Settings
Under Default settings, update the physical path to point to the folder where the app resides.
NOTE: you will have to give permissions to IIS_IUSRS account on
the folder or run the application pool under the context of a user
which has necessary privileges to read from the directory.
FYI, all the IIS configuration resides in applicationhost.config file which resides in C:\Windows\System32\inetsrv folder.
Inside this file, the site configuration is present under the <sites> xml tag.
Here is an exmaple:
<sites>
<site name="Default Web Site" id="1">
<application path="/">
<virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:" />
</bindings>
</site>
</sites>
I wouldn't recommend editing the file directly as it can be prone to human errors. I would recommend to use appcmd commandline utility instead.
You can leave the binding as it is. As per the above binding, all the requests that hits port 80 on the server will be handled by the web app. If you intend to add HTTPS support, then you will have to purchase a SSL certificate and then add a SSL Binding for your site.
The website usually goes in the C:\inetpub\wwwroot folder. That is the default IIS root directory. You can change this if you please in the IIS settings mentioned below.
For the second website, you can add another folder anywhere on the server, technically. In IIS: Right-click Sites -> Add Web Site and then set the physical path and other details to your new site's file directory.
Edit: I missed the DNS part. You just have to point the DNS name through your hosting company to the IP and port of your website. For the second site, just put it through a different port and point to the same IP and that port. There's other ways to do it, however: Multiple domains on same webserver

How to register WCF service on windows server 2012 with IIS 8.0

I am new in asp.net, I have to access .svc from my application for that I have to deploy .svc service. But got this error when accessed my WCF service from browser,
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Few suggested the solution to re-register asp.net.
I cannot register asp.net 4.0 or any other component from commad line on the windows server 2012 as it is giving me error message and commands me to do any installation from "windows add & remove features". I did so. But no luck.
I then tried to activate my webservice using but then also no luck
<serviceActivations>
<add relativeAddress="integrate.svc" service="wcf.integrate" />
</serviceActivations>
I think there's a issue with windows server 2012 or IIS 8.0.
Please guide me where am I wrong.
its almost the Same as you do in normal Windows.
1) first Publish your Service and then copy the Published folder inside wwwroot.
2) open IIS manager by typing inetmgr
3) now drill down to your Service in IIS Manager
Sites -> "your service"
4). Right click on your Service Folder and select "Convert to Application". now your folder icon will be changed to Web icon.
5). now go to Content view of your service Application and browse your ".svc" or service file. you will see your service will be visible in the browser
after adding your service to IIS. pls cross Verify two things
1). extension .svc is available in your MIME types
2). "system.ServiceModel.Activation.HttpHandler" is available in HTTP Handler
** if not please follow the below url to handle the same :- https://gyorgybalassy.wordpress.com/2012/09/24/publishing-a-wcf-service-on-iis8/
** also refer below URl to make sure HTTP Activation feature is enabled in your windows server
https://pubs.vmware.com/mirage-56/index.jsp?topic=%2Fcom.vmware.mirage.api.pg.doc%2FGUID-552D845B-E530-4898-A06B-4F73E668BEFF.html

how to Execute .aspx file on server

Sir,
I have designed a website using Visual Studio using asp.net, it is successfully getting executed on localhost
I want to make the website live on my own server.
After uploading the project files on server and then checking on the link www.abc.com/project
it gives the following error:
Forbidden
You don't have permission to access /project/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at abc.com Port 80
Note: the host is linux based server, and the website project is not having a database
Edit:
You added to your question that the host is a Linux server running Apache. You cannot run an ASP.NET application on Linux/Apache.
Prev: I'm leaving the information below for other people who might search for this problem when running IIS.
Locate the folder's physical location on the hard drive and pull up the Security settings. Depending on what operating system you are using, make sure the following have read/execute privileges (write as well depending on the functions of the site):
IIS_IUSRS
IUSR_MACHNAME
NETWORK
NETWORK SERVICE
If you still have problems, open the Web.config (or machine.config) and add
<identity impersonate="true" />
in the System.Web node.

IIS 7.5 and Razor Site: 500 errors for CSS and JS

For some reason, when I deploy my Razor MVC web site to my Windows 2008 R2 server, I'm getting 500 internal server errors for all CSS and JS. I'm not sure why, because I've done the following:
Enabled static content in IIS
Enabled anonymous access, with the default ID being the application pool identity and given that identity read/write permission to the folders
Ensured my static content handler was setup correctly
What other problems could it be? How can I even debug this to see what the actual error is? Even though I have an Application_Error handler, nothing is getting logged. And IIS logs doesn't give me the error info?
Thanks.
Mime-Types were my trouble
I had the same problem. My css and js was not delivered. Server says internal error.
I found out that i added the mimetype for mp4 in the global settings of the iis and also added the mime type in one of my websites as well.
That was a problem. This mime-type can only exist in the website or global, not both.
I deleted tehe global mimetype and everything worked like it should be.
Hope to help some guys of you.
Just found, that I've added to web.config *.woff MIME for IIS 7.5, so when deploying on IIS8, it's causes static files error. After removing that from web.config everything is fine.
I got 500 errors because I added this below to my web.config. After I removed it, I got passed the error.
<staticContent>
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
To rule out one basic permissions situation, try this:
Select your web site and go into Basic Settings.
Take note of which application pool your site is running under.
Exit out of there and select the Application Pools node.
Find the application pool for your site, and take note of which identity (account) that application pool is running under.
If the account is a specific user identity -- in other words, if it's not a built-in account (such as ApplicationPoolIdentity, Network Service, Local System, etc) then:
Launch your Local Users and Groups.
Find and open the local IIS_IUSRS group.
If the account in question is not a member of the group, add it.
Reinstalling IIS fixed the problem.
If you are on your local server and taking this error, please check if you have any missing packages. Catch errors in global.asax and if neccessary reload all packages with;
Update-Package -reinstall
in Package manager console.
Hope it helps.

flex2gateway problem

I have a test server which has been working up until recently. Its running ColdFusion 8
But now when I browse from the server or externally
http://localhost/flex2gateway
I get the following error
500
No configured channel has an endpoint path '/flex2gateway/eurl.axd/f902379d5cc8514ba3feca5933aee37d'
javax.servlet.ServletException: No configured channel has an endpoint path '/flex2gateway/eurl.axd/f902379d5cc8514ba3feca5933aee37d'.
at coldfusion.filter.FlashRequestControlFilter.doFilter(FlashRequestControlFilter.java:87)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
This may or may not relate to us having recently installed and modified some IIS settings.
Everything is working ok, except for the flex2gateway. IIS & CF all talk properly. I managed to get it to work by setting ASP.NET to 2.0 and creating an empty web.config file. Setting it to ASP.NET 4 however still has the same issue, must be missing a configuration somewhere.
I discovered that the web.config files that .NET 2.0 were pointing to in the IIS configuration were missing.
Adding empty web.config files fixed this problem.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
</system.web>
</configuration>
If you recently installed IIS; are you sure that IIS and CF8 are set up to "Talk" to each other? There is a tool that comes with CF called the Web Server Configuration tool. You can use it to tell your IIS Instance to send CF related requests to your instance of CF8. If you are using CF Standard you can only have one instance of CF8.
Since your URL specifies 127.0.0.1 you may also have issues with virtual hosts. Do you have multiple instances of IIS? If so, how does IIS know which one to send 127.0.0.1 to?
Did you check your crossdomain.xml?

Resources