![]() |
How to run ASP.NET in PHP on Apache, for free
It's so dead simple it's silly.
If for any reason you don't want IIS exposed or you just prefer to use Apache as the public web server, you can still use ASP.NET within your PHP or Perl pages! All you need are: IIS 5 or 6 with .NET installed Apache with PHP or Perl Apache should be running on your public port and IIS can be running on whatever you like. Then, all you need to do is this: PHP Code:
Contents of test.aspx: Code:
<script language="VB" runat=server>IIS is parsing the file through ASP.NET and passing it to Apache which then outputs the contents. So basically, you've got Apache running as a simple proxy with the advantage of using literally any language that you want. Want Perl, PHP and C# on the same page? :cool: You could pass arguments to IIS in the URL also if you wanted to. Here's my test page: http://richard.phpfuture.net:8080/co...nts/aspnet.php |
Re: How to run ASP.NET in PHP on Apache, for free
I can honestly say I didn't understand a word of that, it all sounds good though :tu:
|
Re: How to run ASP.NET in PHP on Apache, for free
Interesting - but wouldn't you normally run the systems the other way round - apache on port 80 and the local IIS on some other port ? Also, if the aspx (or asp) file has includes itself, or calls other files, does it all still work ?
|
Re: How to run ASP.NET in PHP on Apache, for free
Quote:
I'm running Apache on 8080 and IIS on 80 on my setup, they can be whatever you want though. I came up with this idea today because I wanted to run some ASP.NET within a PHP page and then I thought of this solution. AFAIK, a page cannot be parsed twice (once by ASP.NET and once by PHP) on the same webserver. In practice it means that you can have some system on your network which displays a report web page in C#, VB or Perl and then include this on your public webserver which is running PHP. You could even reverse this and have ASP.NET running on IIS as a public server and then do server-side includes to include a PHP page running on Apache behind the firewall. There's hardly any point to that though because PHP can run on IIS anyway. With some fancy kind of Apache rewrite rules and stuff, you could make the server request any page with an .aspx extension from IIS directly. |
Re: How to run ASP.NET in PHP on Apache, for free
thats pretty cool, opens up some pretty interesting ideas.. yay for lateral thinking...
|
Re: How to run ASP.NET in PHP on Apache, for free
:cool:
|
Re: How to run ASP.NET in PHP on Apache, for free
Nice :tu:
|
| All times are GMT +1. The time now is 22:13. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum