dll for machine on 64 and IIS runs as 32 bit - vb.net

I have an web project which is target for framework 3.5, but the web server is 64 bit and its IIS runs on 32 bits. I need to import the dll but there are various and I don't know which one is fit for my project. There are net2.0 and net3.5. Do I use the dll for net3.5? Thanks in advance.

In IIS, under sites, there is an application pool specified for each site. You can specify there whether the application runs on 2.0 or 3.5. IIS probably already has the DLLs.

Related

Why would Development Server be finding a specific assembly in the GAC and IIS not?

I wrote a WCF Data Service, when running it on the Development Server it runs without any issues; however, once I deploy it to IIS it throws this error System.IO.FileNotFoundException.
The assembly it can not find is located in the GAC. Why would Development Server be finding a specific assembly and IIS not?
Enabling 32 bit applications on the Application Pool fixed the issue.
Just my guess, but I reckon the assembly is compiled as .net 4 and IIS is running under .net 3.5. Check here.

Could not load file or assembly 'EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies

I am getting this error in a WCF web service when the program attempts to use a method that employs the entity framework. However, we know that the server has the entity framework (correct version) installed because it is hosting another WCF web service and an intranet site that use it successfully.
I've tried to set copy local to true, however this simply compiles the Entity Framework dll into the debug/release folder of the project that uses it, not the web service project that gets deployed (the project that gets deployed contains a references the project that uses the entity framework).
Has anyone run into this kind of issue before and know a work-around either with or without using copy local?
The solution to this problem was to simply place the EntityFramework.dll and .xml file generated in the bin of the project that uses the Entity Framework and place that in the bin of the service project that was being deployed.
Check to see that the Application Pool for the IIS Site in question is set to use to correct .NET Framework version. In the case of EF 4.1, the Application Pool should be running on .NET Framework version 4 or higher.
To identify the version of .NET being used by the site, first find out the Application pool in use (in IIS, click on Basic Settings for the site), then identify the appropriate pool under the Application Pools node. The .NET Framework version should be listed.
Check whether bit versions are compatible between entity framework and server. If the server is 64 bit and you are using 32 bit entity framework dll you can get this error. Then change app pool setting to enable 32 bit applications.

Installing a WCF service that does not have a MSI

I have developed a WCF service using .NET 3.5, VS 2010 on Win 7 64. This will be hosted in a Windows Service.
I created a Windows Service project to which an Installer is added by rt-clicking. The WCF dll is also added.
For testing purpose I have installed this service by running the InstallUtill.exe passing in the service exe from the Windows Service project release folder. All works fine I can see the service in Services.msc and they can be accessed by clients.
The client does not want an MSI so I have to give him the release folder of the Windows Service project.
Here are my questions:
Is it required to add the .NET framework requirement, which gets added by default for MSI projeccts, to the Windows Service project. If yes then how do I go about doing it?
Can the client use the InstallUtil.exe from the framework or is there another way to install on machines that don't have VS?
Does the service need to be built for both 32 and 64 bit systems?
I know that InstallUtil.exe is part of the framework and any machine that has one is good to go but just out of curiosity is there any other way to install the Windows service without an MSI?
Regards.
I don't know about InstallUtil.exe, but I do know that in order to install a WCF service manually, you need to:
Give the client the requirements (.NET framework, WCF installed)
Create a folder in IIS for the service
Create a bin folder in that folder
Copy the .svc and the web.config in the first folder, and copy the .dll in the bin folder
In IIS, right-click on the folders and Convert to application (the two folders)
Be sure that the folders have the appropriate rights
I had to do this for test purposes on several machines at my job. But in the end, we did an MSI for the client.
Hope that helps you!

WCF service works only with C# client on Win7 64 bit - IE can't even see it!

I have a weird situation with WCF web service running on Win7 64 bit.
First the configuration:
.NET 3.5, WCF, web service compiled for x86, running as a console app (or Windows service, doesn't make any difference in this case).
I am using basicHttpBinding. I also have aspNetCompatibilityEnabled set to "true".
I have test clients written in C#, Java, PHP, and Ruby.
Now the issue:
Everything works just fine on XP Pro, Win7 32bit, Win server 2003, Win server 2008 R2 64 bit.
When I run on Win7 64 bit, everything installs fine and the web service starts up just fine. I can run the C# client against this service and it works. When I run Java, it errors out with "Can't connect".
Also, when I type in "http://localhost:55555/RmJobService.svc" in IE 8, it comes back with a blank page right away, suggesting a connection issue. Interestingly, when the web service isn't running, IE 8 takes a lot longer to come back with an error.
Since it works on Win server 2008 R2 64 bit, this doesn't seem to be a 32/64 bit issue.
It is strange that a C# sample can consume the service...
Any help would be greatly appreciated!
thanks!
daver
There is an option in IIS 7 app pool settings to "Enable 32-bit applications." This may help since you are compiling in x86 mode.
Have you enabled the metadata exchange endpoint?

WCF Server Application Unavailable - how to run application written in .NET4.0 (IIS6+)

I am trying to run simple application (e.g. generated from template by VS.NET 2010) on IIS6.
I changed it to run with .NET 4.0 (its application pool) and checked with regiis (this pool has 4.0). I also changed all possible httpHandlers (svc etc), to run with NET4.0. All possible rights are checked (i think so).
Almost every request results in "Server Application Unavailable" (sometimes it is empty page with -2146232576 (0x80131700) value) and "...Please review this log entry to discover what caused this error to occur." but EventViewer and IIS Log are empty.
Any ideas? Where to find error details?
Do you run any 2.0 apps on the same server? If yes it could be the issue in case they bot use the same application pool. The application tool itself doesn't have any .NET version setting, it's per virtual directory (application). But you can't use the same application pool to run applications with different versions of .NET Framework apps.
Create two seperate app pools one for your CLR 2.0 and CLR 4.0, the older clr can not host both CLRs, there was a similar issue with 1.1 and 2.0.
cheers
A little bit old question, but still could help someone...
If you installed the higher .NET f/w recently, check, if your apps written for lower versions of .NET f/w were not (automatically) moved to new app pool for the higher f/w.
Many years ago something similar happenned to me after f/w 3.5 installation. Then my 3.5 application worked fine, but after any of the 2.0 apps was firstly called, the app pool crashed.
Needed to move every app to corresponding app pool.