I have to modify an old application made in what I believe to be pre .NET ASP (I am a Java programmer, I don't usually program in ASP so I am not sure).
I found the page I need to modify and modified it but my modifications are not taken into account.
I think I need to do something to force a recompile of the application but I do not know what.
The application in question is deployed on a Windows 2003 server if it matters.
Related
I was tasked with introducing some new functionality into a legacy system which would be a great cost saving to the business.
An initial investigation revealed it was a Classic ASP project written with VB. Not being overly experienced with Classic ASP I researched if I could use ASP.Net for my additions and found they work together quite nicely. I introduced some simple new functionality, completed some initial tests and confident it would work set about the remainder of the project.
During development I found that I couldn't access data set in the Application_OnStart event of the global.asa file from my .ASPX pages and as a workaround I created a Global.asax file which sets the same values on the Application_Start event. This has meant a little configuration duplication / loss of DRYness since these files contain the database details rather than reading them in from a separate config file (these in essence ARE the config files) which was deemed an acceptable trade-off for time saved separating them out.
However, in moving from our DEV to our UAT environment I'm now finding that changes in the global.asa file on the UAT server are reflected immediately whilst changes in the Global.asax file require a recompile and redeploy of the .dll to take effect. Changes to .aspx pages are reflected immediately with no need to recompile.
Is this always the case or have I inadvertently introduced this issue during the setup and development of the project? If so can you explain how so?
Classic ASP and ASP.net are different technologies, but you can use them in the same website (in the same way you can use Classic ASP and PHP in the same website if you really want to). One consequence of this - as you have discovered - is that each needs its own database connection. Another which frustrates many people is that session variables created in Classic pages are invisible to .net pages and vice versa.
As you have also discovered, Classic uses code which is executed at runtime while .net uses compiled code. The need to recompile the project following changes is part and parcel of ASP.net development.
I should also mention that Classic uses VBScript. This is a similar, but not identical language to VB, or VB.net
Classic ASP is regarded as "legacy" - if you're unfamiliar with it then it makes sense to add any new functionality in a technology with which you are more familiar
I developed a website using Microsoft Visual Web Developer 2010. I'm not a serious programmer, but I can get by if the software is user-friendly enough. Anyway, I have come to learn that the website I developed was on ASP.NET 4.0 -- I think it might be 4.0.30319, as I look in my computer-->c:/-->windows-->microsoft.net-->framework.
Anyway, the webhosting company I'm with has ASP.NET 2.0 installed on their servers. Consequently, when I uploaded my site, I get a runtime error, telling me that my web.config is wrong, or whatever. But I'm positive that it's because my website is in 4.0, and their servers are on 2.0.
Well, this is a company website, so it needs to get up ASAP. I know I could switch hosts and all that, but does anybody know of an easier fix? I tried deleting the web.config and the site loaded, but it was all screwed up. The site works fine in my localhost.
So the long and short of it -- is there anything I can do to make my site work on a server that has only the ASP.NET 2.0 framework?
In short; no. It would probably be faster for you to get a new host than try to backport your site to 2.0, unless it is extremely simple. But 4.0 code won't run on a 2.0 site.
If you don't want to change hosting company, the only way is to 'downgrade' your site to .NET 2.0:
Right click on your project -> properties -> build -> target framework
PS
this will probably involve a (big) amount of changes to your code.
You either need to change the framework of the site or upgrade your host.
What you're asking is "how do I get an application that requires Windows 7 to run on Windows 98?"
You may be able to push the DLLs to the site (specifying they are content files and the site can then include them) but this isn't easy by any means (nor is it 100% fool-proof).
Can .asp & .aspx pages work if placed in same virtual directory?
Short answer is YES and I have used such configuration in past.
Long answer is there are unlikely chances of having trouble - essentially, both ASP and ASP.NET will run within same application pool and hence same worker process and there can be issues related to the same. For example, ASP page is using COM components written .NET version higher (or different) than ASP.NET version that you are using and ASP.NET code gets triggered earlier loading CLR with lower version within process - which may cause an issue for .NET code for COM components.
The best way is to try it and test it to reasonable extent.
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
I'm migrating a website made in classic asp to asp.net, but the asp.net dev server doesn't handle .asp pages.
Is it possible to make it run .asp pages? Maybe a custom httphandler for .asp?
thanks!
Are you running Winxp with IIS installed? If so, here's what I do: hit the asp pages in the browser using your local IIS, and then open the folder where the ASP pages reside as a website project in VS. Go to the Debug menu, choose Attach to Process, and then look for the dllhost.exe process that is running under the IWAM_MACHINENAME user. You also have to make sure the you have setup the virtual directory to allow ASP server-side debugging. After attaching to that process, you can set breakpoints, etc. as usual.
The last time I had to debug asp pages I found it was easier to insert a bunch of Response.Write()'s. If you cant find a way to do it in VS, then this may help.
Unfortunately you will have to use traditional (or arcane!) methods to debug your asp pages in VS2005 (i.e. alert(), response.write() etc.)
Possibly not what you want to hear, but vs2005 doesn't support this. It was re-added into vs2008. Perhaps one of the free vs2008 express edtions might get you out of this hole?
In addition to the answer provided by patmortech I would recommend that if you are testing a mixed tech site you attach to aspnet_wp to debug the .NET portions of the app. This is also true if your app uses third-party ISAPI filters.
The Cassini server is good for pure .NET only.