IIS7.5 Application is using web.config in the root directory instead of its own! - iis-7.5

Note: I did not setup a virtual directory its a Application!
Here is the structure
Hard drive folders:
-IISRoot
-Webpage
Test.aspx
web.config
-WebService
-Bin
Service.svc
web.config
IIS is setup the following way:
-WebSite (Mapping against ISSRoot\Webpage)
-Service ((Application) mapping against IISRoot\WebService)
Now when i try to run the Service.svc i get a error that a httpHandler was not found ("Could not load type 'Jympa.Nu.FileRequestHandler'")...
Now if i look in the web.config in the root there is a line adding this but the web.config in the webservice is not..
So why is IIS using the wrong web.config?
Edit:
If i remove the web.config in the
Webpage folder the service works but
the webpage stops to work..

I found a solution i changed the pipeline mode on the application pool to Integrated.

Related

IIS always search file in the wrong directory

On my PC (Windows 10) I wrote a new website (VB windows forms, .aspx files).
If I run the site from inside Visual Studio 2019, all OK, it starts and run correctly.
Now I need to have this site always "ON", I installed IIS, configured a "new website", name, directory and so on. I configured the new website in IIS to the directory where I develop, not in wwwroot.
Nothing works: I always have a 404 error.
To simplyfy everything I wrote a simple .HTML file, "prova.html", I placed it in the real website directory, and I tested it with Firefox: http://127.0.0.1/test.html.
Still 404:
URL requested http://127.0.0.1:80/prova.html
Physical path C:\inetpub\wwwroot\prova.html
It seems that IIS ALWAYS searches the file in the wrong path, but I configured the correct directory where the file is.
Of course if I place my test file in "inetpub\wwwroot ..." IIS finds and opens the file.
Any suggestion?
You can refer to the following steps to deploy the project in IIS:
Right click on your project and select publish:
Then add the site in IIS:
Solved ... installing IIS I didn't install the .NET part ... I feel very stupid.

Creating Virtual Directory on IIS for Coldfusion Lucee

I am trying to Move my Website on a local directory from Adobe Coldfusion to Lucee.
I was able to Install Lucee with the Windows Installer.
IIS is working fine.
When i Create a Virtual Directory from IIS to Map a Physical Path (C:/Website) outside the inetpub root folder (FOR IIS) or outside the Tomcat/webapps/ROOT folder (for Lucee), IIS doesn't load that physical folder. Instead it loads the inetpub root folder and i can't access files from the Physical Path Directory.
I am using //localhost/{The Alias} to call the Website but saying file not not found.
Obviously because it's calling from Inetpub file Directory, not the Physical path.
Are there any special configurations i need to make?
I have searched online and no post could help.
Note that i am using different computers.
Kindly Assist.
mod_cfml (the adapter that is used with Lucee/IIS along with the BonCode Connector) does not currently support virtual directories. You will need to configure those manually in the Tomcat context config, like so:
<Host name="lucee.org" appBase="/home/lucee/public_html">
<Context path="/vdir/" docBase="/home/other_user/public_html/some_other_directory/" />
<Alias>www.lucee.org</Alias>
</Host>

Enabling basic http authentication in IIS on Elastic Beanstalk?

For a demo site on Elastic Beanstalk, I'd like to enable basic authentication in IIS (not in the app, but instead have IIS handle it). I can't find how to configure IIS to do this - you don't seem to have much access to IIS configuration itself. Any tips on that appreciated, or if I'm missing the boat here.
thanks!
You need to use ebextensions to customize the server.
Create a yaml init.config file inside a folder called .ebextensions in your web application root. Set the contents as follows:
container_commands:
00-iis-features:
command: dism /online /enable-feature /featurename:IIS-BasicAuthentication
Read more about ebextensions here
Also, see my answer here https://stackoverflow.com/a/42336644/1165140 on how to modify root IIS config.
Hope this sorts you out.

CF 11. 'ColdFusion is not defined' error using ColdFusion.Ajax.submitForm

Just re-installed everything on new laptop after old one crashed. Upgraded from CF9 to CF11 in the process. Running IIS on Windows 10. Local site is working fine, except when it comes to submitting a form with ajax.
ColdFusion.Ajax.submitForm('registerForm', '/register_action.cfm', callback,errorHandler);
I have <cfajaximport> at the top.
I have an IIS virtual CFIDE directory
pointing to C:\ColdFusion2016\cfusion\wwwroot\CFIDE
Mapping in CFAdmin is correct
There was not issue with CF9. But I notice CF11 has its scripts directory OUTSIDE the CFIDE directory on the same level (directory named "cf_scripts"), whereas CF9 has the scripts INSIDE the CFIDE directory.
Before I stuff things up, has anyone any pointers in the right direction?
SOLUTION
For the benefit of others, I did the following:
CFAdministrator Default ScriptSrc directory: /CF_SCRIPTS
IIS Virtual Directory: CF_SCRIPTS pointing to C:\ColdFusion2016\cfusion\wwwroot\cf_scripts\scripts\
Create a virtual directory in IIS that points to that scripts folder.
In the ColdFusion administrator, under the Server > Settings tab, make sure the Default ScriptSrc Directory name matches the IIS virtual directory name you created.

Deploying ServiceStack App to IIS Subfolder under Root

I have a simple ServiceStack application that I was able to host as a console app and I'm now wanting to package/deploy it for IIS.
I've created an ASP.Net application project and can successfully run the service on my local machine. When I tried to deploy it to an IIS server (v7.5) in a subfolder under root, I get a 404.
Per the examples and documentation on the ServiceStack site, I set location path web.config setting like this
<location path="api">
...
</location>
I tried these paths
/api
/subfolder_name/api
but none work.
Is it not possible to have it in a subfolder and have it the path of api?
I have it in a subfolder under the root and have the path config'd like this: . Yet it doesn't work. So does that mean that all of my files have to be under the root and then I have to alter the global.asax to include my apphost init code? Seems a little messy to me.
Not sure of your exact setup but specifying the path in AppHost.Configure() may also help:
SetConfig(new EndpointHostConfig
{
ServiceStackHandlerFactoryPath = "api",
});

Resources