How to deploy ASP.NET MVC application with devexpress components to Azure websites - asp.net

Is there a way to deploy asp net application with dexexpress components other than using virtual machine with installed libs on it?
I want to deploy it to azure websites but get an error that .dll are missing (dont get that error during debugging on localhost where devexpress installed).

Be sure, that you marked the referenced assemblies that you want to publish on the vm as "copy local = true". You can find that option in the properties of a reference.
The output folder of your web app will be automatically copied over to azure websites. For more information how web pages are packaged have a look How to: Create a Web Deployment Package in Visual Studio

You can try one of these options:
Find a NuGet package which includes the dll's you need. I don't know which components you use but NuGet contains a lot of packages -> https://www.nuget.org/packages?q=devexpress
Include the dll's you need in a 3thPartyLib in your project and then reference these assemblies (with copy local = true) from your project.
Be sure to include the license file in your deployment.

Related

Unable to load DLLs when starting up IIS Express hosted web project (VS2015)

Backgroud:
I am in the process of migrating a console application to be part of our existing web API project. All development work is done on Visual Studiod 2015 (with IIS Express). The application uses few third party datasource api DLLs to grab data from that datasource. All these DLLs are managed by our internal nuget package sources.
Issue:
Now the console application runs fine and can load up the those DLLs. I copied across the logic into my web project and added the DLLs via nuget. Solution builds but got the following error when starting up the web project:
Could not load file or assembly 'ABC.DLL' or one of its dependencies. The specified module could not be found.
Where ABC.DLL is one of the third party DLLs.
I have done the following:
Confirm ABC.DLL is in the bin folder of my web project
Changed target build platform of my web project to be x86 and unchecked "Use 64 bit version of IIS Express for websites and project" setting in VS2015 (the third party dll is 32-bit)
Ran dumpbin.exe on ABC.DLL's dependency and got XYZ.dll,MSVCR120.dll,KERNEL32.dll,MSVCP120.dll,mscoree.dll
Regarding to the last step, those dlls were all missing in the bin folder (but the last 4 DLLs should be in system32 win directory so shouldn't matter?)
As for XYZ.dll, it is another third party library and is located on C:\Program Files (x86)\XYZ\ folder. I manually copied it across to the web project bin folder (in fact copied across all Dlls inside XYZ folder) and still get the same issue.
Questions
What am I missing here? The console app obviously can load ABC.DLL but the web project can't. Appreciate it if you can tell me what to check next.
The error message from start up web page is not very useful, is there a way to find out where the web project is trying to load the third party DLLs?
Thank you in advance!
Simply adding external DLLs to your Bin folder is not a great idea. Files can disappear from this folder for various reasons, such as your team members deleting a seemingly useless DLL, or through Visual Studio clearing it. Also, the output DLLs from referenced projects in your solution, would end up there, and are replaced every time you build your project.
What you should do for third-party DLLs, is create some "dependencies" folder in, or close to, your project, and stick the DLLs in there. Then you should right-click on the project, select Add Reference, browse to that new "dependencies" folder, and add a reference to the DLL that way. This is similar to the way NuGet works; it keeps DLLs in their respective folders inside the packages folder, and adds references to those DLLs.
I finally found the issue and thanks for all the help, I had to disable shadow copying in VS (mentioned in 64 bit managed assembly with unmanaged dependencies not loading in IIS / ASP.NET MVC 4).

App_Code in local IIS and Azure/TFS build

I am using Visual Studio Express 2013 for Web & developing web APPS ( not sites ) on .net 4.5.
I build,test & view my site on a local IIS 7.5.
I host on Azure - using App Services.
I build and release to an App Services slot using VSTS Online
I have my classes in an App_Code folder - files are marked as compile
This appears to be the only way I can set this up to work on local IIS ( or am I missing something ?)
And it all works - all classes are available
But I need to build and release on VSTS/TFS ( using VS Team explorer to push)
I am using the standard Azure Web App build definition module on TFS -
Which takes the App_Code folder and moves it into the bin folder - but does not compile it - thus breaking the classes when they are deployed
I have tried renaming App_Code but that breaks local and still does not compile on TFS
What am I missing - how do I get TFS to either compile my classes OR copy the App_Code folder to the root ( not ideal but hey it works )?
In TFS, dll files will be generated under bin folder when you build a Class Library project. This is the correct phenomenon. Suggest you to create a Nuget Packages to manage your class libraries . And you can add a "NuGet Installer" task at the top of your build definition to restore the nuget packages for your solution.
If you are using vNext Build on TFS. There also has been a very detail tutorial Build and Deploy Azure Web Apps using Team Foundation Server/Services vNext Builds for you reference.

Configuring existing ASP.NET project for DNVM, DNX environment on a Mac

I have an ASP.NET Web API project created on Windows using Visual Studio. How can I set this up for use with DNX/DNVM (on a Mac)?
Switching to Git solved the source control compatibility with TFS. But I wasn't able to find references to getting a project working across both these development environments.
I'm assuming as a first step the project will have to be migrated to ASP.NET 5/vNext but wondering other problems lurk around the corner with different project members using different environments.
I get an error when I run - git:(master):dnx . kestrel
As you mentioned yes you will have to migrate any namespace changes. I have a project that is developed across both. Also changing csproj files to xproj. Support is coming for some kind of interop between the different project types but its not here yet.
For build, publish, deploy from git without relying on VS publish capabilities or MSBuild you can follow my blog post here.
Basically you use DNU to publish and then kudu to deploy.

How to create an MSI installer package for an ASP.Net website?

How do I create an MSI installer package for an ASP.Net website ?
Can anyone help me with a good link?
Mosty of the articles just presents the solution for windows applications.
I get this Error by using Add Deployment Project: when merging assemblies aspnet_merge. in Deploy Project.
http://codeissue.com/articles/a04df930da62eb1/create-asp-net-deployment-package-using-web-deployment-and-web-setup-project
ERROR: Error 35 An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'SatmapSkillReport' found in assembly 'App_Web_4fgmsrtw'. Project_deploy aspnet_merge 1 1
It is actually possible but please note that my experience with this was with Visual Studio 2008. I haven't tried this on Visual Studio 2010 or 2012.
In VS2008, click on File > Add > New Project
In Add New Project dialog, select Other Project Types > Setup and Deployment > Web Setup Project
From there you can right-click on the project in the solution explorer and click View to see the user interfaces, launch conditions, registry settings, etc. or in Properties to set the virtual directory name. You can also include the output files of any project or your main project to be deployed.
If you configure this correctly and build that project, the output is an MSI installer file. When you use this MSI installer file, you can use Add/Remove Programs (win xp) or Programs and Features (win7).
I guess you can setup DNS, permissions, run a database creation script, with the various possible configurations available.
A good guide with a lot of screenshots here
UPDATE
Web deployment project is not available in VS2012
Web deployment project is available in VS2010
I found solution my self.!
you can follow link.
[1]: Can't rename MSI afterwards
and for Help:
[2]: https://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

How to add reference to Microsoft.Office.Interop.Word.dll while copying an asp.net app from dev server to test server

I am referencing Microsoft.Office.Interop.Word.dll in my asp.net web application at development server.
No i need to move this app from development server to testing server.
I can't see the dll in the bin folder of the app as it is pointing to GAC.
How should i reference the above specified dll in testing server?
Do we need to do anything with web.config?
Please advice.
Thanks,
Ram
Visual Studio uses different sets of the PIAs on the development computer. These different sets of assemblies are in the following locations:
A folder in the program files directory.
These copies of the assemblies are used when you write code and build projects. Visual Studio installs these assemblies automatically.
The global assembly cache.
These copies of the assemblies are used during some development tasks, such as when you run or debug projects that target the .NET Framework 3.5. Visual Studio does not install and register these assemblies; you must do this yourself.
Link
If not found DLL you have to download from internet....

Resources