ASP.Net portable server - asp.net

I'm trying to start on a new project to help enrich my asp.net knowledge, since I'm not completely satisfied with what my class is teaching me. From my (very little) experience with Rails, I recall every application containing its own development web server. Say I were trying to create a local-only application, but I want it to run in a web browser (Therefore ASP.Net). Are there any options in terms of being able to distribute an application and have it launch its own, or just not require IIS/VS/Apache-mono?

You may want to look into aspNETserve. It sounds like it would fit your needs. I haven't worked on it recently, so it probably has some rough edges.
On the plus side its all open source, and if you are just getting started with ASP.NET it would be a real eye opener on how the internals of the ASP.NET lifecycle operate.

The simple answer is that you need a web server to run the application. It cannot run without one.
If we're talking demo purposes or you don't require that many features of a web server there are redistributable web-servers that you can include with your setup package.
Like Alex mentioned the most popular one seems to be Cassini.

I'm assuming that you want to run the site on the same machine you are developing it on.
Visual Studio 2005 and up allows you to run the site from VS itself if you want to view it locally on your development machine.
To my understanding Visual Web Developer allows you to do the same as well.
Visual Web Developer

You can use the cassini web server. Please note that those are different redistributable:
http://www.asp.net/Downloads/archived/cassini/
http://ultidev.com/products/Cassini/

I'm not really certain why you would want to develop a web application (with all the difficulties it entails, due to the fact that you are dealing with a stateless connection to an unknown client machine), but then run the entire thing on the client machine.
Surely it makes more sense to develop a WinForms application?

Follow this guide to setup IIS on your PC to run ASP.NET apps:
http://www.geekpedia.com/tutorial25_Setting-up-your-ASPNET-server-IIS.html

Related

cross-compile ASP.NET website to desktop?

Is there a way to cross-compile or port an ASP.NET based webpage to a native Windows GUI?
I am developing a web app, with an ASP.NET webservice doing much of the grunt work, and an ASP.NET webpage as the GUI. I would like to also offer an "offline" version of the app that doesn't require teaching random people how to manage IIS. Some of my target users will not have internet access consistently when they want to use the app; also, I like not having to rely on an active web connection myself because I'm an old fogey and this web 2.0 stuff is just a fad, right?
The core of the app logic is a library that is disassociated from everything else - the service just provides an API (which I want publicly available for others to use), and that I use for my own app. I could go ahead and design a new GUI in WPF or WinForms, import my libraries and there you go, but I'm lazy enough that I'm curious if there's an automated solution. Or even a semi-automated solution.
If I can target not-Windows as well, that would be nice. I already have a console interface that I used in development of the core library that directly accesses them, which I'm still testing but should relatively easy to make work in WINE but if I can offer more support for offline use to non-Windows users I'd feel better.
You could run that web application on .NET Core in a self-hosted way. That way you get the full IIS feature set and there is no need for the user to configure anything.
You can then use a WebBrowser control to show the application as a GUI app, or just open the web site in the users installed browser.
.NET Core runs on non-Windows as well.

Debugging Dot Net Website as Domain Normal User

We are developing asp.net website, API and MVC project using Visual Studio. Currently the system we're using are using local administrator account. We are now mapping it to the domain user (normal user). However, certain features are not supported by Visual Studio when we do things like this... importantly..
Debugging applications that a run under a different user account,
such as ASP.NET websites.
Deploying a web application to Internet Information Services (IIS) on a local computer.
Check MSDN Doc here
Note that deploying to IIS is not an issue for us, however the we're unable to debug the application and that is real deal breaker here!
I would like to know how to do debugging for asp.net websites when using domain mapped normal user.
I know this is not a programming related question. However, seems like most of dot net programmers are affected with this and I don't know where to ask for help, so posting it here. (Suggest if any other site is suitable for this!)
Thank you for your help in advance.
The simple answer, as mentioned in that MSDN document and this SO question, is that you can't.
It might be possible to do it through roundabout ways, such as changing the credentials that the IIS worker, application pool, and related processes run as, but even if it were possible, it wouldn't be supported, and most likely wouldn't be worth the effort. Here are two very old articles that deal with the topic:
https://msdn.microsoft.com/en-us/library/aa289173(VS.71).aspx
http://jameskovacs.com/2006/03/16/debugging-as-a-nonadmin/
It may be more feasible if you're able to run your application in an OWIN (Wikipedia) container running in an alternate (to IIS) host.

How to port WPF desktop application to web application?

I have a WPF desktop application (using the Prism library) that communicates directly with an SQL Server in Azure. I would like to make this application easily accessible by users in my domain (not necessarily on the same network) without the need to install the MSI. What would be the best way to achieve this?
Preferably, the solution should work in Windows 7 and later and/or in Internet Explorer, Chrome, Firefox.
Should I try converting the application to ASP.NET and run in IIS or is there a better alternative? I've heard of xbap but not sure it's suitable for my needs.
Hope this helps:
WPF app into ASP
Having worked with both WPF and ASP.NET, I don't think you can just "convert" one into the other. Maybe some of the code (such as your Azure server communication feature) can be shared using assemblies, but you would still have to rewrite some (most) of it.

advice on working on remote asp.net applications

I'm a (relatively new) developer using asp.net with VB.NET. Currently all my applications are developed on my PC and then are built and moved onto the web server. I'm going to be working remotely for 3 months in which time I'll be connecting to the company network via VPN. What is the best way to access my projects? I need to have the projects stored on the company network so that others can access them too. So simply copying the projects to my laptop, working on them, then copying them back won't suffice. I tried to just open the projects off of the network share but am getting application trust problems.
I'm just wondering what other developers do in this situation?
You will need some kind of source control solution, probably best if it was web based. Something like git which is very popular maybe useful for you.
WinMerge is pretty simple to use.

Standalone ASP.NET development server

I remember seeing a page on codeproject.com where a developer took one or two .dlls from Visual Studio Web Developer 2008 and created a simple win32 form application for hosting a standalone development server.
It was a small applicaton that allowed you to enter the path, port number, and a "GO" button, and it launched the server standalone, without having Visual Studio installed.
I am looking for that solution but can't seem to find it. I am also aware of the Cassini project, the extended version of it, and a webdev.exe (or something like that) solution, but not the dll + form app.
Thanks in advance.
-- Martin
I don't know what happened to the code project article you mentioned. However the framework has the ability to host and run asp.net web applications. Rick Strahl has a nice article on hosting asp.net webpages within a winform app Using the ASP.Net Runtime
There is also an older article on the cassini server on MSDN
It should be simple enough to do what you want with those articles as a starting off point.

Resources