a year ago I created and deployed a simple web app from visual studio 2012. This included a dll in the bin folder containing the code behind.
Fast forward one year and I need to make a small change to the .cs file.
I open the solution in VS2012, make my change and select build project. No bin folder and no dll are created. I try build website, rebuild website and anything obvious I can see but even though the build process works fine I do not end up with the bin folder or the dll. I have double checked the live site and the web site contains a bin folder and a dll rather than individual code-behind files.
Have I missed something obvious or fundamental here?
Have solved this now. The compilation of the dll happens at the publish web site stage and not the build web site stage. Once I sorted out an issue with FTP I was able to publish to the live site and the dll was overwritten with my new one
Related
I've inherited a messy ASP.net web application. Last week, for the first time, we were supposed to push changes to the application to the production systems.
No problem, right? Just follow the usual steps!
This project has been published in the past with precompilation turned on.
I published the project using the exact same publish profile that was saved in Team Foundation Server. I sent it to Mr. A, the person who has access to the production systems. The next day, they told me that it wasn't working. It works fine in my development environment!
Mr. A told me that upon closer inspection, he noticed that in the old version, the bin folder contained numerous files with a .compiled extension. In the new version, the only file with a .compiled extension is global_asax.compiled. I checked the settings and it clearly says that it is publishing with precompilation, so why are all these files missing from my publish directory?
Also, and this may or may not be relevant, the exact error message indicates that the web site cannot read from a resources file. The project is ASP.net WebForms, not MVC.
You'll want to make sure that 'Allow precompiled site to be updateable' is unchecked.
This is will compile the front-end aspx, ascx, etc. codepages into the /bin folder as *.copiled.
I'm connected to a customer's site. There is a bug in an ASP.net MVC site i'm trying to solve.
As i make changes in the various .cs files, the web-server is not changing it's behavior. It seems that the web-site is determined to use the pre-compiled .dll files in the Bin folder.
How can i instruct IIS to recompile the web-site from scratch, in order to pick up the live changes?
I tried deleting my own .dll file:
\Bin\Contoso.dll
But then the web-site crashes.
Note: i am asking how to do this without access to Visual Studio; otherwise i would have changed the web-application into a web-site and redeployed.
You will need to recompile the dll with your changes from your development machine and deploy them. MVC ( I mean asp.net application) uses dll not source code. In short , what you are asking is not possible.
I have inherited an old ASP.NET web site project (not a web project), so it uses the web site model from what I gather. There is no code in the App_Code folder. There are dozens of aspx and aspx.cs files in a different folder.
What I have done so far:
I have copied the entire project locally from the previous person's fileshare (he's gone and didn't use TFS).
I loaded the web site in VS2008, made a small change to an email address in the code and rebuilt it.
At this point, it compiles fine, no errors. But the dlls in the bin folder do not reflect the proper date/time stamp. I published the site to the test server and it is still using the previous email address before I updated it.
My problem: Why would the dll not get updated? I have read there is a difference between a web site model and a web application model. When I select Build from the menu, it actually says "Build Web Site", and not the project name. This is my first experience using this type of project.
My Question: Any ideas what I can do to resolve? I have already combed through similar questions on this site but the ones that are closest to my issue don't have resolve/answered status.
Thanks
From what I recall, didn't websites perform runtime compilation and hence not generate a dll? Don't quote me on that though, it's been a while. Could you convert it to a web application from VS?
You should have a solution with at least two projects:
Sln
- Website
- DLL
On the Website add a reference to the DLL and build. Should take care of it.
Alternatively you could convert to a Web Application as well, but you'd have the same problem if your project structure is not correct.
I'm a real newbie for ASP.NET web development, having a background in Java. A friend has an ASP.NET 3.0 deployment running on IIS. He can't find the original project files created in Visual Studio 2008 and has asked me to give him a hand.
Is it possible to recreate the project from the deployment on IIS? I see lots of ASPX and and CS files so in the inetpub[domain]\httpdocs directory.
I don't see the .SLN file. I assume that's what he needs. Would it be a real chore to rebuild? Are there any assets or source files that won't be deployed to ISS that I'd need to recreate?
Thanks
Re-creating the soloution/project files is (potentially) a small part of the recovery. Do you see any .aspx.cs or .aspx.vb files on the web server? If not, you'll need to extract the code from the code for each .aspx file from the DDL's in the web site's /bin folder. You can reverse engineer any .Net code quite easyily luckily with reflector, however all comments will be lost.
If you have the aspx and the cs files, you are in business: all you need to do is create a new Web Project in Visual Studio and select "Add Existing Files". You would then select all your aspx pages only and the cs files should get automatically imported for you.
Obviously, as anything, you'd probably have some references missing and what not, but shouldn't be incredibly painful to fix all those issues.
If it's a compiled web application project the code will be in a compiled assembly in the bin folder. This can be decompiled with .NET reflector. The source will be readable but not as original.
If it's a website project you're in luck. The code files will be in the website structure (*.aspx.cs or *.aspx.vb). These will constitute pretty much all of the assets you need to recreate the site in Visual Studio. Creating a project and solution file to manage these in VS will be the easy bit.
I have developed an ASP.NET web application that has the following files (after being published): Default.aspx, Web.config, .dll (in bin folder), .pdb (in bin folder), and an App_Data folder that currently has nothing in it. This application runs well in Visual Studio.
My company uses Apache so the IT department decided to try Mono to run my application. Unfortunately, the application does not run. A question that was asked of me was where the .cs file was located. Out of the output files, after publishing, I cannot seem to find the .cs file that the .aspx file is suppose to refer to. Am I missing a file out of the list that I provided above?
Also, does anyone know soem rules of thumb or processes for getting an ASP.NET web application to run through Mono. I just need some direction.
I really appreciate everyone's feedback on this.
Thank you,
DFM
You need to install mod_mono on Apache. There is more information about this on the Mono ASP.NET page. The .cs is compiled into the DLL is not needed at run-time.
The .cs files would be compiled into the DLL, so they are not needed for deployment. Other than that, we would probably need some more information to figure out why the app won't run under Apache/Mono.