Can I deploy ASP.NET Core MVC program by file copy with USB to multiple Windows 10 PC, like Winforms does? - asp.net-core-mvc

I do not know if an ASP.NET Core MVC program can be deployed like a Winforms program, just copy program files.
I am trying to code an ASP.NET Core MVC program. Whenever user type localhost in their PC browser and IIS Web program will show company related documents. Because there are a lot of PCs need to be deployed. So I wonder if I can deploy ASP.NET Core MVC program like Winforms by copying program files.

First let me tell you it's ok. Also marc_s' comment is very correct.
I guess I understand your needs. You should install this web application for every user, even if you are not connected to the Internet, you can also access it through localhost.
But what we need to understand is that the asp.net core application should be deployed on the server, so that each user can access the web service by accessing the server ip address or domain name. This is normal operation.
You should check the setting about the single-file deployment. Then we can get .exe file. Then you can add this .exe file to startup items.
Reasons for not recommending:
Each of your PCs needs to install the .net core sdk or runtime. This is very unfriendly.
If the application needs to access the database, the application cannot run without the network.

Related

IIS 8, New website from file..?

We're being forced by our ISP to migrate to Windows Server 2012. We have a couple dozen websites that need to be moved. Under IIS6 one could export a site to a text file and recreate the site, bindings, virtual directories, and all, on another server.
It looks in IIS8 that there's no way (that I can find, anyway) to similarly create a website - it looks like websites have to be created by hand. Please tell me I'm wrong..?
Take a look at the Microsoft Web Deploy tool. It can export an IIS6 site into a "package" that can be imported into another IIS server. Here's a walkthrough for migrating from IIS6 to IIS7+: http://www.iis.net/learn/publish/using-web-deploy/migrate-a-web-site-from-iis-60-to-iis-7-or-above

Having an issue with Authenticaion for MVC3 Web Application

I have an MVC application that displays just find in our QA environment, but not in our release environment (2 separate machines, but both machines have the same version of Windows, IIS, and of course, the application code)
It seems that in release, it cannot access the JavaSripts in a js folder. What makes it a really odd problem is that if I simply change the "Physical Path Credentials" property in the Advanced Settings to a user, instead of just leaving it as Application user (pass-through authentication), then everything works ok, EVEN if the Specific User that I put is the actual same user as the Application Pool user! However, when I do that, then the razor code
#System.Web.HttpContext.Current.Request.LogonUserIdentity.Name
returns the service account, instead of the actual user browsing the site.
In both environments, everything is the same!
The operating system is:
Windows Server 2008 R2 Standard
Version 6.1 (Build 7601: Service Pack 1)
The IIS Version is: 7.5.7600.16385)
The Application Pool uses version .net 4.0, integrated pipeline
For the web app, the only authentication enabled is Windows Authentication.
Can some one help?

standalone web application

Is there way to run web application as standalone desktop application? Could be web application written using PHP, MySQL and Apache converted to standalone application which meets following requirements:
1. Application should be called as http://myapp.localhost.
2. Application should have desktop icon which directly opens browser with application's URL.
3. Source code of web application should be hidden from users.
4. Installation for end user must be as easy as possible.
Now I do steps 1-2 using xampp and manually creating shortcut. I was interested in some wrapper, installer which do above steps automatically. But I have no idea about 3rd step.
Regarding item 3, see Can you "compile" PHP code?. This would allow you to develop in PHP and deploy the application via an installer.
There are several installer packages which would allow you to automate these steps, depending on your development environment.
PHP and MySQL require to have a web server running. That means you will need to copy the code over to the client's machine and then run the web server locally still on the client's machine.
If that's what you want, look into the Microsoft IIS Express (here).
In short, IIS is a web server that can host and run a server side web application, written in ASP.NET or PHP.
Here are the steps you need to take:
Install IIS express on the client's machine (one-time process, and I think quite acceptable - treat this as a runtime installation).
Create a designated (hidden) folder for the source files of the web application that you want to deploy (one-time process).
Create a windows batch file (bat or cmd) that starts the IIS (as described here) and then opens the website's URL so that the default browser starts. This file will serve as a shortcut, so you can place it on the desktop or wherever appropriate (one-time process).
Deploy your web application to the hidden folder from step 2 above (repetitive process - deploy to the same folder when you want to upgrade the clients to a new version).
Please have in mind that I am basing my suggestion on your requirement to host and run the application locally (on localhost).
However, if there's an option to run the application on a separate machine (not a localhost), then you could simply place a desktop shortcut to the network or internet address URL that would open the default browser without problems.
i would suggest Pouchdb http://pouchdb.com/api.html and Adobe Air http://www.adobe.com/devnet/air/air-sdk-download.edu.html. This way you can code with html and javascript and package it with Adobe Air.
I'm afraid it's not that simple.
If you want to use this approach (and I highly discourage it), you will have to deploy a webserver of some sorts on the client. You should be able to run the Apache/IIS Express and MySQL/SQLite executable and start a simple webserver and database.
If you'd also like a icon, you can create an installer that creates this icon and points to the URL you wish.
I'm afraid that's not possible. PHP is and always will be a scripting language. You might be able to obfuscate it somehow, but anyone who can download your application will be able to de-obfuscate it.
Again, you can create an installer. Inno Setup is pretty good from what I've heard.

Can Visual Studio Automatically Attach to my Azure Virtual Applications?

I have an Azure solution that I want to debug in Visual Studio 2010. I have two MVC sites set up as Virtual Applications in a single Web Role - this structure makes sense from a cost and url standpoint. The virtual applications worker processes don't spin up automatically and therefor VS doesn't attach to it. After hitting the virtual applicaiton url (i.e. localhost/app1) in the browser, a new w3p process starts and I can manually attach to it. Just wondering if someone out there has done this before and has a tip on how to automatically attach to the process.
Related post that makes it sound like you have to do it manually: http://social.msdn.microsoft.com/Forums/uk/windowsazuredevelopment/thread/f1c5d72b-9196-480e-ace6-3c9063be79a7
This isn't Azure specific, but you could trigger a breakpoint when your application starts:
protected void Application_Start()
{
#if DEBUG
System.Diagnostics.Debugger.Break();
#endif
...
}
And you could try to combine this with a startup task only running when you are in the emulator and that hits the url of both web applications (using wget.exe for example). This will create the w3wp process, triggering the Debugger.Break.
Resource: http://blog.smarx.com/posts/skipping-windows-azure-startup-tasks-when-running-in-the-emulator
For working on multi-site roles, at development time, I have a separate Cloud project for each site, and use a combined one for deployment purposes only. It's not ideal, but it is easier than the whole manual-attach thing.
(For history fans, this practice originally started before the SDK added support for Local and Cloud configuration files. We used to have a Local project and a Cloud project, because otherwise we kept forgetting to switch the connection strings before deploying.)

ActiveX Flash-Player can't access web-content?

I have a ActiveX control hosting a flash-player which is in turn running a flash file trying to access data from a web-address.
In an old Windows Application version of my application everything works fine and the flash file is able to access the web-content.
However, in a newer Console Appliction version of the application it can no longer access the web-content.
Any ideas what might be causing this? Is there some kind of difference between a Windows Application and a Console application in terms of security/permissions that might affect an ActiveX hosted flash-player?
I'm using Windows 7.
First of all - how did you manage to get an ActiveX into a console application? :) I think ax needs window handles and all such things...
Anyways, there are different kinds of sandboxes from the Flash player perspective, what you are seeing is the "local not trusted" kind. In order to "trust" the SWF that issues the request you would need to use this page to confirm that the location where SWF comes from can communicate to the internet.
Doing so may be a hindrance for the user, but if this is the case, you could write the trust files on your own. Example

Resources