|
Well, given the huge amount of information you've provided, I'm sure somebody will be able to come up with a solution for you.
</SARCASM>
Remember, we can't see your screen, access your computer, or read your mind. All we have to go on is the information you put in this little box. So far, the only information you've provided is that you get this error, and that the actual cause of this error "doesn't apply" to your application.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You probably have your main web.config in a sub-folder of your site. Either by accident or because your site is misconfigured in IIS (if the site root folder is "mysite" you can't dump a website at "mysite/subsite"). As we can't access your system from here and you have provided no real information beyond the error, it's hard to give specific advice.
|
|
|
|
|
I just started learning asp.net webform myself, I don't understand webform much, I don't know what information you need? In your opinion, if I have a Web.config file I don't need to declare the above error, if I have two "mysite/subsite" Web.config files, how do I register them? I sent the Web.config file and reported an error to you: Web
Error 1 It is an error to use a section registered as allowDefinition = 'MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\WebSite2010\App_Data\Web.config 22
I will send the image of the program, you see the attached image http://www.mediafire.com/view/dpkqjr7yunbhjc4/website2010_01.jpg/file
I have used IIS, you see the attached image http://www.mediafire.com/view/rzf3pcy4wtjg2su/website2010_02.jpg/file
If you need any information what, please ask me.
|
|
|
|
|
An IIS site can only host one website, so one folder with web.config in the root. If you want to host multiple sites then you need an new IIS site created for each one, and they can't be in sub-folders of each other;
/site1/web.config
/site2/web.config
You would register a site in folder "site1" and one in "site2". If you have this arrangement
/mysite/site1/web.config
/mysite/site2/web.config
and register an IIS site at "mysite" thinking you can then do http://mysite/site1 and http://mysite/site2 then you'll get the error you have now.
If you do want one site nested inside another you need to create what is called a virtual directory. Google for how to create sites in IIS, this is all well documented.
|
|
|
|
|
I understand what you mean, I deleted all the web.config, I left only one web.config file at the root directory, then the error occurred:
The type 'XXX' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\YYY' conflicts with the imported type 'XXX' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\ZZZ'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\YYY'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\YYY
how to fix this error ?
|
|
|
|
|
Delete the temporary .net files and just make sure the site is deployed correctly, make sure you have project references where one project access another's code, make sure you're not defining the same type in two projects, and so on.
The fact that you deleted all web.configs leaving one makes me think you still don't have a properly deployed solution. If you did there wouldn't be multiple configs. Google how to deploy a VS project to IIS to make sure you're doing it properly.
|
|
|
|
|
I find a lot of information on google on this error but I have not found any article to fix this error. I went to the directories:
C:\Users\Administrator\AppData\Local\Temp\WebSitePublish\xxx
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\xxx
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\xxx
to delete but when I Rebuild reappears with another name whose extension has not been changed, how do I fix it ? I submitted a sample of my faulty program, what errors can you see ? You see my attached file: WebSite2010
I searched the Internet for errors that were similar to my program errors, viewing and reference. This error may also show up c# - Namespace class conflict - Stack Overflow
1. Close Visual Studio
2. Clear Temporary ASP.NET Files directories by clearing the following folders:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\
C:\Users[your_user_name]\AppData\Local\Temp\Temporary ASP.NET Files\
Restart the World Wide Web Publishing service (Start menu\Settings\Control Panel\Administrative tools\Services).
3. Clear the project's Bin and Obj folders and deploy new assemblies if it is necessary;
4. Rebuild your application
|
|
|
|
|
The error is probably a red herring, the issue is that you simply haven't deployed correctly. We can't access your machine, we don't know how your project is set up, or your IIS or your folders or anything.
|
|
|
|
|
Did you see the example I sent you ? According to you, how to fix the above error ?
|
|
|
|
|
I am struggling to find the best way to persist a select list collection from the OnGet to the OnPost. This is required because I have a razor page with multiple tabs where the user save the details in the first tab (using OnPost that clears the SelectList) and then continues to the next tabs.
Repopulating the collection(s) from the database after the post works but that seems like it is the wrong answer.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Mycroft Holmes wrote: Repopulating the collection(s) from the database after the post works but that seems like it is the wrong answer.
Why does it seem like the wrong answer?
The only other options would be to store the entire list in one or more hidden fields, which would bloat the request and response sizes; or to store the list in the session, which would increase the memory pressure on the server.
If it's possible to reload the list from the database, that seems like the least-bad option.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Interesting, as a desktop developer I have always attempted to reduce the number of calls to the database, caching static tables in memory on the local machine. I was looking for a similar capability in the web development arena.
I will have no compunction reloading from the database in future, it will reduce some of the gymnastics I used to perform about current lists!
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I have a page in asp.net that queries an XML file and shows the data. It shows the data I need in the nodes, but I want to print the specific values deeper in the node… for instance I want to be able to print the value - PARIS or country France in the XML example below. with the line below I can only print the first element but I am not sure how to print the other values,Any advise on how this can be achieved?
Note the rest of the code works and shows the other elements in the upper nodes, It s just I want to know how to display the name values or specific name value in the sample xml file below
Asp.net Line Code:
CityValue = node.SelectSingleNode("ns2:fields/ns2:field", nsManager).InnerText, _
XML:
<ns2:fields>
<ns2:field name="currency">EUR</ns2:field>
<ns2:field name="starRating">3 Star</ns2:field>
<ns2:field name="Country">FRANCE</ns2:field>
<ns2:field name="longitude">2.344952</ns2:field>
<ns2:field name="latitude">48.872646</ns2:field>
<ns2:field name="hotelID">6950</ns2:field>
<ns2:field name="city">PARIS</ns2:field>
<ns2:field name="zipcode">75009</ns2:field>
</ns2:fields>
|
|
|
|
|
|
It s not a namespace issue. Everything works as far a namespace is concerned. I want to know how to drill to the name Attribute and get the values displayed. for instance,
City or Zipcode values
|
|
|
|
|
Try:
CityValue = node.SelectSingleNode("ns2:fields/ns2:field[@name='city']", nsManager).InnerText
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard. That's exactly what I was looking for
|
|
|
|
|
<xs:element name="note">
<xs:complextype>
<xs:sequence>
<xs:element name="to" type="xs:string">
<xs:element name="from" type="xs:string">
<xs:element name="heading" type="xs:string">
<xs:element name="body" type="xs:string">
|
|
|
|
|
When I Rebuild the error below, how to fix and fix errors ?
Warning 1 The type 'webapp4U.UI.Controls.Controls_MenuLeft' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website2010\e7f1df91\85da5ad5\App_Web_2oy154p1.0.cs' conflicts with the imported type 'webapp4U.UI.Controls.Controls_MenuLeft' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website2010\e7f1df91\85da5ad5\App_Web_kgvuexfr.dll'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website2010\e7f1df91\85da5ad5\App_Web_2oy154p1.0.cs'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website2010\e7f1df91\85da5ad5\App_Web_2oy154p1.0.cs
|
|
|
|
|
The message is self explanatory; you have two versions of the Controls_MenuLeft class, and the system has to decide which one to choose, which may not be what you want.
|
|
|
|
|
My problem is how do you solve this problem ?
|
|
|
|
|
Remove the duplicate class from your project.
|
|
|
|
|
It's not duplicate class from your project. It's only one
|
|
|
|
|
It is not my project. And there is a definite duplicate as shown in the error messages, so you need to find out why, and remove one of them.
|
|
|
|
|
I will send the sample to you to see, see the attached file WebSite2010
|
|
|
|