I am currently new to ASP.NET C# programming and have created a ASP.net Web application project in visual studio 2010, .NET 4.0. I have researched thoroughly to find a solution to my problem the last couple days but had no luck.
My issue is, debugging my project has no issues running on my local machine. I have a Site.Master page that is reference with a site.css. All my .ASPX pages run through the master site. However when i publish my website using File System
and setting my target location to my desktop, any call on a < href> tag to my default.aspx cannot load the site.master page. the error is as follows:
"The Master Page file 'Site.Master' cannot be loaded.
Correct the problem in Code View".
now i do have IIS 7.5 installed, and i have tried to create a website through the inetmgr by following various steps through google searches and videos and still have no luck. is there something specific i am missing? everything is named the same in reference to stylesheet.
In addition to WraithNath's comment, might want to ensure IIS is configured to allow ASP.NET
Related
We have got a space in our company server with url tools.mysite.com which is a .net based web application. So its working fine in our domain. But now we have new requirement of setting up a new application under tools.mysite.com which is also a separate web project done in ASP.NET 4.0. Unfortunately I dont have any previous experience of setting up IIS single site with multiple application. But with little googling, I tried creating a applicaiton under Default website (tools.mysite.com) and specified the physical location and alias as downloads.
So obviously as I expected I am getting that path in browser like this and for testing I put a test.txt file there.
tools.mysite.com\downloads\test.txt
which is working fine
But the challenge is when I try
tools.mysite.com\downloads\default.aspx
its triggering an error resource cannot be found. But default.aspx is there which is my home page I have created and its loading fine when I run the application from Visual Studio itself.
So please help me to run my second .NET based application.
I am working on upgrade to 4.5 .net frame work and found the 10 year old code that I have never seen before.
This ASP.net form project has two project, both can be hosted.
One aspx page has a image button, and I check the code
aspx page in project A
xxx.Attributes.Remove("src")
xxx.Attributes.Add("src", "../xfolder/y.aspx")
y.aspx aspx page is in project B
My question is how can project A and project B hosted? They hosted on the same web site on IIS? Or just create a sub folder under the main folder, so when ever y.aspx called it will be found.
Hope my question makes sense.
Thanks
Greg
You can host them under the same site in IIS but one would need to be a virtual site of the other i.e. www.sitea.com and www.sitea.com/siteb.
I am wondering whether could I link a .asp page from a .aspx page. I am using Visual Studio 2012 and I have few .asp pages created before. I want to transfer my new .aspx page to some of these .asp pages. But when I do that it is not showing up in my web browser. It moves to that page but nothing is shown up. I am pretty new to ASP.NET and please guide me.
If should not happen if you are using IIS express to debug (start directly within Visual Studio), but if you are using IIS to host and run the site, it might be because you did not add the asp support to IIS, you could double check it by going to IIS manager -> Handler Mappings, looking for aspClassic, if it does not exist, it means you need to go into Program And Features in control panel to enable that.
I had a website hosted in IIS. One small section of it needed asp.net. So I just right-clicked that section/directory and made it an application and a virtual directory.
Is that alright? Or does the entire "website" need to be made into an application and virtual directory?
The reason I ask is that when I try to browse to the aspx page in this "application", I am getting a parser error message "Could not load type...MyCodeBehindType" in the page directive, which seems to me to indicate that it is not finding the dll's, or even the code behind class files (which are clearly in the same directory).
EDIT:
If I do it this way, with only a subfolder of my website actually being a web application, where do I put the dlls? In a bin folder of the website the web application is within? Or in a bin folder of the web application?
Making just a folder within a website, an application, should be fine. I usually have to remember to change the version of ASP.NET from 1.1 to 2.x, that may be what's causing the error.
In order to test the configuration, start with a blank test page (blank.aspx) with just HTML. If the HTML shows up, you know IIS is serving .NET pages.
If there is a problem with ASP.NET not being correctly registered for IIS, you could try re-registering it. Open the following folder:
%WindowsDir%\Microsoft.NET\Framework\x.x.x\
and run:
aspnet_regiis.exe -i
I am using VS 2008 with a very simple UpdatePanel scenario.
But i cannot get UpdatePanel to work and cant seem to find out why
I have in fact reverted to a very simple example to validate it is not my code:
http://ajax.net-tutorials.com/controls/updatepanel-control/
In this example I click on either button and both text links update.
I dont get any errors, the page just behaves like a normal ASPX page.
What things do i need to check. I've been googling this for an hour and not found what I need.
Edit: Works in Visual Studio web server but not in IIS
If it's working locally, but not when deployed to a remote server, that usually indicates that you're using ASP.NET 2.0 and the ASP.NET AJAX extensions aren't installed on the remote server.
If it's a server you have administrative control over, you can download the installer here: http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en
If it's a web host, tell them to get their act together.
Another option would be to check your web.config. You could for example create an new Ajax enabled ASP.NET website from Visual Studio. This will generate a correct web.config. Copy over all non-ajax sections from your existing web.config and you're set. This worked for me.
-Edoode