I am currently building an ASP MVC 2 site and I am looking at hooking ELMAH in for my error logging however I'm not sure how to handle the different build environments.
Both my development machine and current test server are 32-Bit and the production server is 64-bit. I can set the MVC site to deploy in x86 and x64 without any problems but is there any way I can get it to use the 32bit and 64bit ELMAH binaries on their respective servers without needing to change the referenced DLL between builds?
The difference between the two editions is due to SQLite since it uses unmanaged code. If you are not using the SQLite provider, it doesn't matter and you can use the same version in both environments. If you are using SQLite then I am not sure how to do this, but I gather most people will use SQL Server in production so won't really run into this issue.
Hope that helps.
I had the same problem, and not using SQLite was not enough to make it work. I tried removing all configuration for SQLite.
I noticed that the SQLite dll was published with my project, so i removed it from the folder containing the Elmah dll. Now my application works in both 32-bit and 64-bit.
Related
I plan to develop website in ASP. NET core. In past i wrote few ASP. NET website but as far as i remember it requures to buy special hosting which needs to have. NET installed. I would like to know whether nowdays is it enough to have cheap hosting without. NET support to pubslih my ASP. NET core website or i still need to buy hosting which has. NET support?
ASP.NET Core can be published to either use an installed .NET Core runtime or self-contained, in which the required parts of the framework are actually published along with the app. In .NET Core 3.0, you can actually publish a .NET Core app as an entirely self-contained single executable file.
In either to publish self-contained (whether in a single executable or not), though, you must target a particular runtime environment when you publish (i.e. Win x64, Linux x64, etc.) You can then only put the app in that actual environment, i.e. if you publish for Windows, you can't deploy that to a Linux box. However, you could simply re-publish for Linux instead.
If you target an installed runtime, similar to how .NET Framework works, then you can publish once and deploy anywhere, assuming the destination has the .NET Core runtime installed.
Long and short, you are not locked into any one particular way of deploying. If you want a framework installation, you can do that. If you want self-contained, you can do that as well.
That said, you should still avoid shared hosting. They usually do not support .NET Core at all or don't keep up with deploying new versions. Additionally, deploying self-contained is generally going to be disallowed to prevent users uploading rogue things. You can get a VPS all to yourself for like $5/mo, so there's really no value proposition to shared hosting nowadays, anyhow.
I have Visutal Studio 2012, MVC 4 & Razor. I am having trouble getting a website up and running with this technology.
The Web Server is a Windows Server 2008 server. I tried deploying using the Web Deploy method but am consistently getting something like 'set ACL" error.
I tried deploying using the File System. All files got deployed, but when I try and run the website, it fails because of missing ASP.NET MVC infrastruccture files.
Two things:
•If I use Web-Deploy, how do I solve the ACL error, because I assume with this method, everything needed will get deployed.
Note that the Web Deploy 3.0 service is on the server and started.
•If I use File System, where can I find the downloads needed to deploy on the server where MVC WILL work.
◦Note that I downloaded the 4.5 Framework and was successfully installed.
You need to be a bit more precise with what you need help with.
What's the exact error.
Often times you need to give the IIS users group access to at least read from the directory where you've deployed. Did you do this already?
Do you have .NET 4.5 and MVC4 installed on the server? If not, are you expecting those DLLs to be "packaged" with your deployment? They generally are not since they are "standard" assemblies. But if you want them to be included in your deployment you can do that by selecting the references in VS and saying "copy." This is not recommended because when you install patches to .NET and MVC on the server, those updates will not carry through to your app, since it'll use the local (old) copies of your assemblies.
This may be more of an IIS issue, but not sure based on the details in your question.
Check that the application pool that the site is running under is using .net 4.0.
Just a thought I would check.
What do I need to do to my Windows 2008 / IIS 7.5 server to allow me to host my new MVC3 applications. It already has .NET 4.0 Framework installed...
I dont want to use the /Bin deployment that I read of on the Internet.
Thanks Paul
You just need to run the MVC3 installer!
All of the DLLs required by your app that are not part of the framework itself SHOULD be deployed into your applications ~/bin folder. Putting DLLs in the GAC is evil.
Benefits of ~/bin deployment:
Your application is guaranteed to have the correct (which is not always the same as the latest) version of each assembly that it requires
Redploying your application keeps those dependencies in sync with your app's requirements.
If you remove the app from the server, you don't leave shrapnel from the installation laying around that is no longer required.
~/bin installation is much, much cleaner than any alternative. I'd like to hear your reasons for avoiding it.
Requirements for MVC3:
Download and install MVC3.
Update your web application project to reference the MVC3 assemblies. (You might create a new, empty MVC3 app and compare the assembly references it includes)
Rebuild and run your unit tests. (You do have a test project, don't you?)
Have a serious look at Razor - it rocks.
It's refers to MVC2 but should work all the same
http://weblogs.asp.net/jgalloway/archive/2010/07/13/server-installation-options-for-asp-net-mvc-2.aspx
If you have access to RDP into your server perhaps the Web Platform installer is the "easiest"
http://www.asp.net/downloads
I have an ASP.NET MVC web application which integrates a C# managed library of ours that loads unmanaged plugins to do some file processing. These unmanaged plugins in-turn rely on a few 3rd party libraries to do their dirty work; some of which are causing IIS to crash.
We use the exact same library in a desktop application which is able to process the files just fine. The files also process just fine when running under the Cassini web server that comes with Visual Studio 2008 (IIS and Cassini are running off the same folder on my local box).
I've done a Crash Analysis with Debug Diagnostic (img) which I'm not able to extract any useful information from.
I used procexp a bit to see if there where any failed file or registry access attempts that might be causing an issue but came up short. I didn't see any but could have easily missed them considering the number of lines produced in that kind of logging.
I configured the application pool to use a domain account and made that account an Admin on my box thinking it might be a permission issue but no luck. Are there other access restrictions in IIS that I'm not aware of?
Suggestions? Articles? Tools? Voodoo?
EDIT: I was able to debug this down to the 3rd party library's initialization routine. Since the library works fine running under other hosts I suspected either a permissions issue or memory issue. It turned out to be a stack size limitation when running under IIS. See Stack sizes in IIS - affects ASP.NET
Sounds like you should try and enable 32-bit applications in the application pool. Interop doesn't play nicely with binaries compiled for 32-bit if you're running 64-bit.
Is there a way to create an installable (ideally XCopy installable) version of an ASP.NET MVC application that will run in a standalone fashion on a Windows XP machine?
I don't mind installing SQL Server Express for this purpose, so I guess the question boils down to this: Can the Cassini web server that comes with Visual Studio 2008 be bundled with the application? Or are there other options?
NOTE: The installation is for demo purposes only, so there are no licensing problems. Also, I am suggesting Cassini because I don't know of a way to install IIS7 on Windows XP. I can't do major hackage on the registry to get this to work.
Not sure if it'll help, but you could definitely check out the UltiDev Cassini Web Server, which can be bundled with your app and should support what you need.
You can package, embed, bend fold and spindle CassiniDev with my blessings.
I have been told that it suits this purpose admirably.
I think this is a bit old, but check out http://msdn.microsoft.com/en-us/magazine/cc188791.aspx.
Also, the ComponentArt demos run on Cassini.
My company makes a product for this purpose called the Neokernel Web Server which includes several features that are missing from cassini like SSL support, logging, multi-threaded request processing, and the ability to start/stop/configure the server from your own process.
A free 30 day evaluation license is available for testing and evaluation purposes.
http://www.neokernel.com