How to "call" an ASP.NET page without using IIS?

Asked

Viewed 474 times

1

I need to get the result of processing an ASP.NET page via programming, but I cannot use IIS.

The right, would be, if ASP.NET, had a CGI to be called, just like PHP has, but I found nothing, only the mono_cgi but from what I’ve seen it works only for Linux.

Pseudocode I need:

processePagina("c:\caminho\para\meu\aspx\index.aspx", "url.ficticia?param1=valor1.....")

This code has to return the same as the browser would receive if you had accessed the file by IIS.

Detail, I can not use IIS Hostable Web Core as I can not install anything on client computer and have to support Windows XP.

Any idea how to do that?

  • If you can’t install anything, how will you put your software? Exists the OWIN that might help, but it’s hard to guarantee without understanding the real problem. You can use an external service, place this page in a hosted location and access it as HttpClient or some similar solution. You can come up with some solutions, but they will probably all be strange. Maybe your problem is something else. I keep trying to figure out why someone who can’t have IIS installed would have a page aspx that needed to be rendered. I couldn’t find a reason.

  • These are specification requirements. 1) The installation must be done fully automated, only display progress for user, user clicked on exe and install alone. 2) It has to run windows Xp (.net framework 4.0 will already be installed on the client’s machine). It is an application that will be installed on the client’s computer, but the configuration interface will be done via browser, that is, the client will access http://localhost:8080

  • Mongoose does exactly what I want... check out https://code.google.com/p/mongoose/

  • The ideal is to [Edit]ar and put in question all possible information that help people understand the problem and make it easy to help you. I still can’t figure out what your real problem is. but it doesn’t matter, it seems like you’ve found exactly what you’re looking for.

  • It’s the same question as this one.... http://stackoverflow.com/questions/19423097/is-it-possible-to-use-katana-to-host-an-existing-webforms-application-within-a-w

  • found more thing: http://www.codeproject.com/Articles/23939/Light-IIS-Run-Asp-net-without-IIS

  • http://ultidev.com/products/cassini/

  • OWIN was the first thing I said. And I said that there are numerous possible solutions. But it is possible that you do not even need all this, the problem may be another, you may have found a solution that caused an extra problem. You found the solution you wanted, right?

  • Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?

Show 4 more comments

1 answer

1

You can use the OWIN to have an HTTP server embedded in the application without having to install anything extra. On the page linked has the initial information and other associated technologies that will be useful, especially the Katana which I think is the implementation of OWIN that you need (it is a server to embed in your application, IE, no need to install anything other than your own application).

You might also know something else right here at Sopt: OWIN and Katana - How it really works and how to use? and Motivation for OWIN.

There are other solutions, but I wouldn’t use them unless I had a reason to derail the OWIN. This solution is supported by Microsoft, is modern and active, I can not say the same of the examples you gave in the comments.

this code has to return the same that the browser would have received if it had accessed the file by IIS

On the other hand if you want to read a page served to do something with it the best solution would probably be the use of WebClient which is simpler or HttpWebRequest if you need something more powerful. I believe this is the second part of what you want.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.