I am using windows hosting for My asp.net mvc 4 application. While upload to server .exe files are rejected due to some security reason. Support team suggest me to upload .exe files as zip files. But visual studio 2015 .exe files are inn bin/rosyln folder csc.exe, vb.exe , etc. I hve no idea what is this and how this used. Help me to upload my asp.net application.
You have to do either one (your choice):
look for a host that works with the latest version of ASP.Net which includes roslyn compilers (the exe files you're seeing), or;
remove roslyn from your ASP.Net application
You can't just zip them up - your ASP.Net app needs (to execute) them. The 2nd option will likely be your choice with your existing provider if they restrict executables (which is actually more common than those that allow it - particularly if its shared hosting).
Related
I'm using a "ASP.NET Core with React.js" template in Visual Studio. I've configured publish process to produce a single file. While it does package all the .NET files into one executable, it still generates a separate "ClientApp" folder that contains a build of a React App.
Is there a way to embed everything inside the executable? Like, copy everything inside .zip archive, embed it as a resource and host everything from there.
I am trying to add a UI to a background service. So that a user could open a page in theirs browser and check service status. Frameworks like Electron will not work for me, as the service should be accessible from the local network, not just from the PC it's running on.
Just in case someone will have the same question in the future, I'll post my solution. First of all, I've packed a build of react app into a zip archive. Then, I've included an archive as Embedded Resource into the project. Finally, I've used Lexical.ZipFileProvider as a FileProvider for app.UseStaticFiles. And voila, the thing just works!
We have not been able to publish to Azure from Visual Studio (for Windows). We managed to do it with Visual Studio for Mac, but we just did not find the way in Windows. Publish seems to work with zero errors, but nothing seems to be pushed in reality. We have also realised we have created another App Service / Server somehow from Visual Studio, so maybe we are pushing to the wrong place not sure why or how to fix it.
Anyway, we have found a way to access to the published files within Visual Studio (by FTP, I guess):
We have updated files that don't need to be compiled (which sometimes does not seem to work either, by the way. Maybe because we are uploading to the wrong server? Maybe some cache stuff?).
Anyway, my question is about how to upload compiled files manually, I mean, by FTP:
May we just upload a full local folder with the compiled files to Azure?
Or maybe compiled files in local environment are different than compiled files to upload to Azure?
Thanks for the clarifications!
For compiled files, like they are all in the bin folder of your project, you need to upload the bin folder to azure via ftp.
I can confirm this behavior by using visual studio FTP deploy azure web app.
My university allows me to deploy my web app only via sftp. Visual Studio deployment tool does not support sftp. What's the best way to solve that problem?
You don't need the VS publish tool.
For a ASP.NET MVC site, you need to upload contents of the project folder, except for anything that will have been compiled... Open Visual Studio, compile your project, then upload via FTP.
Upload the bin folder with the compiled dll's, along with any views, scripts (anything that will be served to the client), and config files in the folder structure inside the project directory.
Basically, upload anything that doesn't have a .cs file extension. The exact files will vary based on your project. (You don't need .pdb files, or your .csproj file either)
If a folder contains only .cs files, you don't need it since it'll be compiled in the dll's (like the Controllers folder). If a folder contains anything else (.cshtml, .js, .css, etc) then upload it.
This can all be done via an FTP client like CuteFTP, FileZilla, Cyberduck etc. Just connect to your server and upload to the directory that is set up for your application in IIS.
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 published a C# .net application to the wrong folder. I am using VS 2005. How do I unpublish the app to be able to republish in the correct folder.
I tried simply publishing to another folder and now the app will not run from either location.
You will need to manually delete all the published files from the wrong folder.
There is no "recall"/"unpublish" function in VS. All "publish" does is compile and copy compiled files and other included files and folders (images, css, js etc) to the specified directory.
Publishing is essentially just a copy of the built application to the destination folder, as far as I aware. This points to a different problem in your application as being the source of your error.
More than likely your app isn't working from either folder because it's configured to use asp.net 1.1 or doesn't have asp.net installed at all on the server. If it is installed, and both 1.1 and 2.0+ are installed, it will default to 1.1, and the folder needs to be configured to use 2.0+.
But other than that, you just delete the files from the server by hand.
Publishing function also creates "Application" on the IIS, so I would probably start by opening the IIS server with "Internet information services manager", and remove the application with the wrong folder.