i have .NET project that is a IIS Service, this is on Windows Server2008 R2 Machine.
I have another project that is C# program, that using the IIS Web service,
my question is how can i rebuild solution/project of the Webservice from C# program?
Thank you
Can you confirm that you have source files which should be compiled and then compiled project should be placed to the directory which is used by IIS web application?
If yes, I would recomment to create a powershell script. This script would perform 2 main actions:
Compile the project. Use MSBUILD.exe utility for that.
Copy compiled folder. Use ROBOCOPY utility for that.
Then just call this script from your C# code.
Related
I have a web app on Azure. It uses .NET Core 3.1. I use two C++ DLL files as dependencies in the app. The first DLL depends or uses the second DLL. When I run the project in Visual Studio locally, there is no issue. When I deploy the app to Azure, it complains only from the second DLL, and it says "unable to load dll or one of its dependencies". As I said the first DLL use the second DLL in its codes by using " [DllImport(#"..\Folder\Second.dll")] ". What do I need to do or add in web app? Why it is working locally anf not on Azure? Any help would be appreciate.
First make sure that your .dll does not need to be registered in the registry on your local computer. Then you can copy and paste your .dll file directly into the scm website for testing. If it can be successful, then it can be supported.
In this way, we only need to add the following code to the .csproj file, and include your .dll file when publishing.
The specified files are included in the release.
If your .dll needs to be registered in the computer registry, then I can tell you clearly that azure web app is not supported because it is a sandbox environment.
But you can publish your application through azure container webapp or virtual machine.
Related Post
DLLImport does not work on Azure App Service Net. 3.1
I am about wrapping up a webapp written in PHP. Now for the deployment on the customer's machine, I want to write A C# wrapper that simply copies this project to a folder on local disk.
I don't want the C# Setup Project to create any files in Windows Program Files. I just want my webapp folder copied from the C# Setup. It would be great too, if the same C# Setup can install a third party web server. Any ideas?
I have ASP.NET web application and would like to run it. The machine doesn't have Visual Studio installed on it. On my machine which has Visual Studio I was able to run the application using the steps mentioned in this link
http://www.codeproject.com/Articles/166319/Run-ASP-NET-Web-Application-from-Command-Prompt
However, the production box doesn't have WebDev.WebServer20.EXE. Obviously the exe file could be downloaded and then I could run the program, but on production box I can't do that.
Is there any other way to run ASP.NET program from command line? It is a simple program, I am not using any third-party dll files and there are no command line arguments.
Is there any other way to run ASP.NET program from command line? It is
a simple program, I am not using any third-party dll files and there
are no command line arguments. I have has IIS. Could you tell me what
to do next. Actually I am not a .NET developer so not familiar with
all this. Any help would be great.
You are missing basic concepts.
You do not need to run ASP.Net Web Application like executable program. Production Sever doesn't need Visual Studio; it just requires IIS and targeted .Net Framework.
Since you have Visual Studio on your local machine, you can publish straight to production server. Here is an example. - OR - Publish files to local folder and copy file to production folder.
Then create a site in IIS, and map Physical Path.
Take a look at hostable web core. For example http://blogs.iis.net/carlosag/archive/2008/04/14/host-your-own-web-server-in-your-application-using-iis-7-0-hostable-web-core.aspx
I developed a site in asp.net using C# as the language.
I have debugged it and no more errors can be found and can also view the page from a browser.
I would like to host this site and direct a client to it for demo purposes but am having a problem each time I publish my site. The publishing only does away with all my .aspx.cs files but I don't see any .exe file that I can install or send to my hosting provider.
I would like to know if this what I am experiencing is normal or there are settings I need to do in my visual studio 2013 ultimate edition for these tasks to be performed?
Kindly advise me on the way forward
ASP.NET applications (not "ASP.NET websites") are compiled into a .dll file in your bin folder, which is then deployed on to the server.
Your .aspx/.cshtml1 files reference compiled classes and types contained within this DLL, thus eliminating the need for source files.
There won't be any .exe files, you need to deploy your project to a web server, like IIS. Check out this link.
I have a .net solution with a C# project and a C++ project. The C++ project is an automation server (.exe). The C# project references an ActiveX interface produced by the C++ project (.tlb or registered interface on the machine). This works great on a development machine as I am registering the .tlb using regtlibv12.exe in a post build event in the C++ project. On the build machine, this fails because the service that runs the builds does not have rights to update the registry.
Is it typical to have the service that runs automated builds run as an administrator? Is there another preferred way to do this?
I also read that regtlibv12.exe is not always installed. Is there another way that is preferred to register a .tlb?
In a C# project just check if C++ application (automation server) is running and run it if not.
Then automation server (.exe) will register all available CLSID's in a system
I found no other way to register the type library in the build process other than using regtlibv12.exe. I had to make sure the automated build service is an administrator and everything works.