IIS 6.0 Default webpage won't work - iis-6

In IIS 6.0 running on a server 2003 r2 the default webpage can't be found, but if I change the url to specifically go to the default page it works.
i.e. website.com doesn't work when defaultwebsite.html is set as the default website, but website.com/defaultwebsite.html works.
I've done simple stuff like enabled default content page and reset iis, but I'm not too familiar with it.
I have another website that works just fine that I compared the settings to. The only difference is that it is running on 32 bit and this new one is 64 bit. Are there any settings in particular that need to be changed or added to get the same functionality?

This fixed it:
In the Windows registry, open the following node: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0
Create a new DWORD value named EnableExtensionlessUrls.
Set EnableExtensionlessUrls to 0. This disables extensionless URL behavior.
Save the registry value and close the registry editor.
Run the iisreset command-line tool, which causes IIS to read the new registry value.
Make sure if you're on a 64 bit system that in the registry you are under the Wow6432Node and not just SOFTWARE:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET\4.0.30319.0\EnableExtensionlessUrls

Related

How to set Tomcat.runtime.environment.version as PROD on the web server?

I want to set Tomcat environment variable as PROD. I tried by putting
set "ENVIRONMENT=PROD"
set JAVA_OPTS="-Dtomcat.runtime.environment.version=PROD"
in catalina.bat
and tried to retrieve it with
env = System.getProperty("tomcat.runtime.environment.version");
but every time env is null! Where exactly does the variable have to be declared in catalina.bat and what's the perfect syntax to set the environment variable? Other possible ways to declare variables are also welcome!
Since you are on Windows and in production, I'm going to assume that you are using a Microsoft Windows Service for Tomcat. If that's the case, the .bat files are completely ignored when launching and stopping Tomcat. There is a service binary that reads the configuration from the Windows Registry and no disk-based scripts are used at all.
If you run the program called tomcatXw.exe (where X is your Tomcat major version number), that will run the configuration GUI. From there, you can configure everything stored in the Registry.
Go to the "System Properties" tab and add your system property -Dtomcat.runtime.environment.version=PROD to the list of properties already found in there. Restart your service and you should be able to see the new system property available to your application (actually the whole JVM, of course).

Artifactory not using specified home directory

I'm currently hosting Artifactory on Tomcat8/JDK1.8.
If I check the system info screen, I can see that files are being written in /u01/usr/share/tomcat8/.artifactory/
However, in the servlet configuration in bin/setenv.sh, I specified the Artifactory home to be somewhere else:
-DARTIFACTORY_HOME=/u01/opt/artifactory
Then, I discovered in the docs, it's supposed to be lower case:
-Dartifactory_home=/u01/opt/artifactory
I rebooted Tomcat after the changes and the path targetted is still /u01/usr/share/tomcat8/.artifactory. The folder is owned by the user running Tomcat as well.
Why isn't it using the specified home dir?
This seems a bit old but for others that struggle with it, you need to set an Environment variable ARTIFACTORY_HOME in your Tomcat startup script not a System variable via -D parameter.
Linux
set ARTIFACTORY_HOME=/pathto/your/artifactory
Windows
"set ARTIFACTORY_HOME=C:\path to your/artifactory"
Notice the quotes for Windows
System properties are set on the Java command line using the -Dpropertyname=value syntax. They can also be added at runtime using System.setProperty(String key, String value) or via the various System.getProperties().load() methods.
To get a specific system property you can use System.getProperty(String key) or System.getProperty(String key, String def).
Environment variables are set in the OS, e.g. in Linux export HOME=/Users/myusername or on Windows SET WINDIR=C:\Windows etc, and, unlike properties, may not be set at runtime.
To get a specific environment variable you can use System.getenv(String name).

Register COM Component for Classic ASP

I'm upgrading an old Windows 2003 server (32-bit) with IIS 6 to a Windows 2008 server (64-bit) with IIS 7.5. I'm in the process of installing necessary DLLs on the new machine (I only need two). The first one worked fine. The second one, ASPIMAGE.DLL is causing some trouble.
Here's what I've done (same process that worked for XZIP.DLL):
Move ASPIMAGE.DLL to C:\Windows\SYSWOW64
C:\Windows\SYSWOW64\regsvr32.exe C:\Windows\SYSWOW64\ASPIMAGE.DLL - I get a prompt saying "DLLRegisterServer in ASPIMAGE.DLL succeeded". I've run this multiple times - I hope that's not an issue.
Set "Enable 32-Bit Application" to True in the Application pool. Restarted the Site and AppPool just to be sure.
Attempt running code (which works fine on the Win2003 machine):
I get this error:
Server object error 'ASP 0177 : 800703e6'
Server.CreateObject Failed
/scripts/update/resize.asp, line 2
800703e6
Note that I've also tried this as a replacement, and I have the same issue (it looks like it registers fine, but the code can't see it):
http://code.google.com/p/aspnetimage/
Any ideas what the issue is? It's strange to me, because it seems like it registers fine, but ASP can't find it.
I was able to solve the problem by using AspNetImage as a replacement in conjunction with LoadPicture(): http://www.w3schools.com/vbscript/func_loadpicture.asp.
http://code.google.com/p/aspnetimage/

Web Browser control defaults to IE7 with IE9 Installed

I am writing an application in VB.Net that is using the standard Web Browser control. I went to YouTube.com with my application and the page had a message saying I was using IE7. I since have checked multiple places and thay all reported my application running IE7, but I have IE9 installed. I visited the same places using the standard installed web browser and the same web sites said I was using IE9. I assume in my application the Web Browser control is switching to IE7 compatability mode. I went to the reg and tried to add my application to the FEATURE_BEHAVIORS but this did not work and still said I was using IE7. When I tried the this I was running my application from VS2010 so I don't know but this may have been part of the problem of why the reg change had NO effect. My main question is, How do I get the Web Browser control to NOT run in compatablity mode as I develop the application in VS2010.
Vb.Net,Vista Home Premium Service Pack 2,Visual Studio 2010 Ultimate
The Actual Key is FEATURE_BROWSER_EMULATION and not FEATURE_BEHAVIORS
Here is Inno Setup script to enable this feature
[Setup]
AppName=Browser Patch
AppVersion=1.0.0.0
AppID={{D1A4934F-E67B-44CF-A8E2-07A8CFEDFAB3}
AlwaysRestart=false
ChangesEnvironment=true
OutputBaseFilename=Patch
PrivilegesRequired=admin
ShowLanguageDialog=no
DisableWelcomePage=True
DisableReadyPage=True
DisableReadyMemo=True
DisableFinishedPage=True
AllowCancelDuringInstall=False
CreateAppDir=False
DisableProgramGroupPage=yes
Uninstallable=no
SolidCompression=True
Compression=lzma2/ultra
InternalCompressLevel=ultra
CompressionThreads=2
UsePreviousAppDir=yes
ArchitecturesInstallIn64BitMode=x64
VersionInfoVersion=1.0.0.0
VersionInfoCompany=Company Name
VersionInfoDescription=Registry Patch
VersionInfoCopyright=Company Name
VersionInfoProductName=Company Name Registry Patch
VersionInfoProductVersion=1.0.0.0
AppPublisher=Your company name
[Registry]
;Current User
Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x2711"
;Local Machine
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x270f"
;64 Bit Mode
Root: "HKLM"; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "yourapp.exe"; ValueData: "0x2711"; Check: IsWin64

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