I got an asp.net web forms project developed from someone. When I check the httpdocs folder on server, I cannot find the aspx.cs files for the corresponding .aspx files. When I check the CodeBehind attribute, it shows like "[FILENAME].aspx.cs".
I also decompiled the dll of this project but even there the aspx.cs files were not present.
Please tell me where can I find the event handling files of this project.
Related
I received the below ASP.Net project. I need to understand the working of this webserver from its code. Where should I start exploring this project from I am a newbie in ASP.Net and C#. Which file among the below will contain the server listening command?
Project Structure
.cs files are the "C-Sharp" code behind files. The ones in the AppCode folder are likely relevant to the project. You should also investigate the "Default.aspx" and associated "Default.aspx.cs" file. This is the default webpage and code-behind file. This does appear to be webforms at first glance. Also, your "web.config" file will likely have server/application configuration information in it. The ".sln" file is your solution file.
That is essentially the File that you can use to open in visual studio, and it should pull in the necessary configs/files to build the project. Open the files up and start exploring.
We have an CMS project, we will publish the project for deploying to PROD server,
However we found that if we changed aspx file content in published project, e.g. Modify label control text,
an error will error.
Is there are any contraint for pubsliehd .aspx and .dll?
Can we just just modify aspx file without re-publish and deploy it again?
Any help is appreciated.
I downloaded an open source project in ASP.NET language.
And I couldn't find any Codebehind file for example inside the Login.aspx the Codebehind is Login.aspx.cs but I cant find it anywhere in the source file. and the Line Codebehind="Login.aspx.cs" identified as "File Login.aspx.cs was not found" but yet the function is still working.
Where can I access those .cs file?
It seems that code you are looking for is compiled in DLL files. Try to get full source code instead of compiled one.
As mentioned by VKX, download link would help...
Verify that the file exist on disk. It may not be included in the project.
You could view all files by clicking the "Show all files" button on top of solution explorer.
If the file does not exist on disk, or reside in some other folder, move it to the appropriate folder. If the file is missing, redownload/unpack it to the correct folder.
For your confirmation once again recomplie the Application if application run successfuly then your file would be existed in the drive. As per your question, might be your application is working on the complied dll.
Just open the Login.aspx in the Visual studio just right click on the tab of the Login.aspx page and select the option "Open the Contaning folder". Check Login.aspx file is existed or not in that folder.
It seems You only have compiled website.So no *.cs file.
You will be able to use website(host using IIS) but cannot change source code.
To view the source code open .dll file using DotPeek Decompiler or RedGate Decompiler
and yes the download link provided in comment is broken.
I have created a website and deploy it on the IIS server. I want to change some code on the
the default.aspx. After I change the code on my own computer. I copy the default.aspx and default.aspx.cs file to the server. But seems don't work on the server. But the website work perfectly on my own computer. I would like to ask do I need to copy files other than the default.aspx and default.aspx.cs? Thank you
Depending on the project type, you need to deploy the assembly into which the changes were compiled. If this is a web application, the web project should have a corresponding DLL.
Is it a web site or a web application project in VS? It sounds from your brief description that it maybe a web application (code behind file) so once C# code has changed then you will need to compile it put the default.aspx and the newly compiled dll up on your hosting.
HTH
You also need to compile your solution and put latest dll of the project containing Default.aspx file, in server's bin directory, since you have made changes to code behind file Default.aspx.cs.
upload dll if you change code behind and aspx if you change design
load your page on browser,if nothing has change press "ctrl + f5" to clear cache and refresh your page
I just publish an asp.net website then i made changes in its source code i added two .aspx files and then publish it again
The question is what I need to make this changes take effect on server. Do I have to replace all files or i can just add specific file?
I'm trying to add two aspx pages to the site that already exist on the server
and want to know which file i have to add beside the ordinary aspx file to take effect on site
Thanks
This depends on how you are deploying your code. Are you using the precompile option before publishing or just publishing with pre-compilation.
If you are just publishing then you can just replace the .aspx and aspx.cs files and the site will dynamically recompile.
If you have pre-compiled it then you are probably only left with .dll files and .aspx files so you would have to deploy a new copy of the .dll file for your site and the .aspx files. MSDeploy replaces the entire site by default.
If you have only changed the aspx file and not the code behind it is enough to publish those two files and on the server. If you have changed the code behind as well you also need to publish the dll files, in that case it's probably easier to replace all of the files.