C# - Possible Alternative Location A Sitemap File Can Be Included In A .net Solution

Mar 10, 2011

I took over a rather large C# .NET 2.0 legacy web application from a colleague who is no longer available. This web application consists out of multiple projects in one solution. And I ran into a problem that I simply do not understand and hopefully somebody here will. The application has multiple .sitemap files included in a sitemap subfolder. So far so good. But I found one .sitemap file that was floating around in the root of the web project and is not used anywhere in the application (it's not included in the web.config).

I excluded this file. The web application runs fine without it. All menu's load correctly. Until I hit a method that uses recursion to look for certain controls (NOT the sitemap!). This method runs down through all controls from a given point and then crashes on the fact that the XMLSitemapProvider is missing this one file. This method is called many times without issues, but when the user logs out it somehow runs through a hierachical path of controls that eventually end up at the missing .sitemap file. The file also needs to be at this exact location in the root. Moving it somewhere else will cause the same crash. The file web.sitemap required by XmlSiteMapProvider does not exist.

I have searched for this filename and all ".sitemap" files but can not find it anywhere in the solution. 0 results found. I've ran past all the code leading up to the crash and it seems arbitrary (it has nothing to do with the sitemaps). The crash just happens because it hits the XmlSiteMapProvider looking for another control when it's going through all controls. In short, I can find no references what so ever to this file!

Since this web application is huge I can not manually go past every section of code. There is hundreds of thousands of lines of code. Does anybody know any other way then through the web.config to include a sitemap or how a sitemap file could be registered and where I should look? Final note: this application used localization. The sitemap's are localized and I found resources for this one sitemap. I hoped excluding those would solve the problem. Unfortunately it didn't.

View 1 Replies


Similar Messages:

Web Forms :: Multi Column Listview For Alternative Solution?

Apr 1, 2010

I am trying to rewrite an Access Database in to a asp.net front end and i have hit an issue that i can not find a good way round.

in the access version of the software there is a screen the displays all cusotmers and invoice information about these customers, there are currently 15 columns on the screen and we currently have around 25K customers and this will only go up. This is done using a multi column listbox i need to replicate this screen in asp.net but i spent all day on this on as yet not found a good way of do this.

the user will need the ability to select multiple customers at a time and because of the amount of data a scroll bar is a must, this is why the listbox is an ideal tool, apart from the fact the standard one in asp.net does not allow multi columns. grid lines would also be useful. I have look at a few third party multi column multi column list boxes but the only one that i have found that seems to work OBOUT's takes far to long to render 25K rows.

View 5 Replies

Set A Location For Alternative Text In <asp:image Button>

Mar 21, 2011

<asp:ImageButton ID="ImageButton2" runat="server" Width="100px"
AlternateText='<%# Eval("Img_Id")%>' Height="100px"/>

In the AlternateText='<%# Eval("Img_Id")%>' I have to write something like this:

'~/images/<%# Eval("Img_Id")%>'

View 2 Replies

Web Forms :: Programmatically Reference .sitemap File That Isn't The Root Web.sitemap File?

Nov 4, 2010

How would I programatically reference a .sitemap file that is not the root web.sitemap file? I have a file called research.sitemap in a folder a level under root. I want to refernce this file in my code behind like his: SiteMapNode m1 = SiteMap.RootNode (but since this isnt web.sitemap in the root, I dont know how to get access to it).

View 1 Replies

What Is The Process To Copy A Working Solution And Get It To Work From New Location

Mar 8, 2011

I have a working solution, and I would like to copy it and paste in a new folder. I am creating a new version of the site, and want to build on a "copy" of the solution. But when I do it, all the paths are lost and it doesn't work. What am I missing. What is the process to copy a working solution and get it to work from new location?

View 1 Replies

Web Forms :: Parser Error Message - XML Sitemap Config File Web.sitemap Could Not Be Loaded

May 11, 2010

We are getting this error message when we try to click the link in the menu to go to Report Server:

Source Error:
Line 31: <siteMapNode title="Reports" description="Reports">
Line 32:
Line 33: <siteMapNode url="https://ffxsqldgc01.ffx.co.fairfax.va.us/Reports/Pages/Folder.aspx?ItemPath=%2fDPZ&ViewMode=List" title="View Reports"
description="Click here to view the reports" />
Line 34: </siteMapNode>
Line 35:

I tried to add after the &, as it was suggested on one of the forum but it did not work. Any other ideas.

View 5 Replies

MVC :: Need To Copy The Whole Solution Directory To The 'virtual Folder' Equivalent Location?

Sep 5, 2010

I am going to deploy my MVC 2 website, do I need to copy the whole solution directory to the 'virtual folder' equivalent location?

View 27 Replies

Visual Studio :: Solution Saving Location - Save In The Same Folder As The Rest Of Files

Feb 6, 2010

So I would like my solution to save in the same folder as the rest of my files. I am a win forms developer so web is new to me.

1) Is there any reason why I shouldn't do that for web.

2) Second how do I do that. I know that I can change the solution's saving location by changing ToolsOptionProjects & SolutionsProject's Location. However, I just want it to use the location of the new website I create and not that specification.

View 1 Replies

C# - How To Get The Name Of Sitemap File From Sitemap Provider

Oct 6, 2010

I am creating a CacheDependency on the file that my SiteMap provider uses. I would like to get the name of the file from my sitemap provider instead of hard coding it. Is there a way?

Edit

Duh, I forgot to mention: XmlSiteMapProvider that comes with ASP.NET

Edit 2

Reflector shows a private member field called _filename that isn't exposed in any way as far as I can tell.

View 1 Replies

Javascript - How To Ensure Js Is Included In Ascx File

Feb 17, 2011

So the problem is the following :

i do have own user control. which has some javascript file in script tag included like this

<script type="text/javascript" src="../somefile.js" ></script>

or some javascript code directly on the ascx page. everything works if i place this control somewhere in aspx markup. but if i add this control to the page dynamically to some UpdatePanel place holder on postback (this is logic i can not alter), control renders itself and then i get js error message, which says that functions which are placed in somefile.js are not defined/are null. Why is this happening ? Is there anyway to force js including in this case.

the code amount is huge and i was not able to provide a simplified example with the same error,.

The script is included but somehow the functions are not defined. I'm novice to js, so is it possible that just the script is included but not executed, so the functions are not declared ???

The interesting is that if on some page my custom control is declared in aspx.

View 3 Replies

Web Forms :: Function In Javascript Included File Is Not Working?

Jul 27, 2010

I am using mixed validation i.e. dot net controls validation and javascript validation. Javascript(js) function is 'hpVali()'. It is working when coding javascript within aspx page's head section. but when i moved it in a js file. It stoped working.

I have used the script to register/add js file in aspx.cs file as:

[Code]....

View 6 Replies

C# - Determine If A JavaScript File Is Already Included Via User Control?

Jan 20, 2010

I'm building several user controls (ASCX) for my website and several of them are very similar in what they do. (As a side note, I must create unique UC's even if they're similar because I'm creating widgets for the new Telligent Community themeing system). For example, two of them are different but use the same front-end code to create a 2 or 3 tab panel where you can click a tab and it changes the data below. I have a single JS file to handle these tabs and the animations. I'm currently dynamically adding my JS file reference to the <head> from the user controls' code via:

Literal jsFile = new Literal();
jsFile.Text = string.Format("<script src="{0}"></script>", "/community/themes/test/js/tabbedCallout.js");
Page.Header.Controls.Add(jsFile);

If I have both of these controls on a page though, both will add this JS file reference. How can I do a check to see if it is already added from another control?

View 1 Replies

Visual Studio 2008 IDE Freezes/crashes When Opening .aspx File With Css Included

May 17, 2010

Visual Studio (SP1) runs fine until I try and view .aspx source files with the lines

<style type="text/css">
</stlye>

anywhere in them, upon which it freezes (i.e is totally unresponsive) and I have to use the task manager to shut it down.

I have read a lot of questions about Visual Studio 2008 crashing on viewing some source files. However, I still can't fix this problem.

I have systematically deleted and re-included all other code and it comes down to these two lines, which is very confusing. Sometimes it happens as soon as the lines are added, sometimes it doesn't freeze until I build the solution with any of the problem pages open. I can add external style sheets, and it only started recently.

I had Resharper 4.5 installed and have since uninstalled it, and do not have anything else installed.

Also, it happens to other people with the same source code, and re-installing Visual Studio does not fix the problem. So I have several questions:

Is there any way I can find out what's happening? I don't understand how the code (the css tag itself) could crash Visual Studio, and am thinking that this is unlikely and it must be something else within my solution, would this be a safe assumption? Could this have anything to do with installing Office 2010?

View 4 Replies

Archive File Search - Finding Alternative

Sep 2, 2010

I am developing a new project to list files and directories under an specified location on disk. I use normal methods like Directory.GetFiles() to achieve this task but the amount of files is getting very big (> 300000) and the site is becoming terrible slow.

I worked with Index server with previous versions of Asp.Net but I was wondering if there is a new way for my website running Asp.Net 4.0.

Also I heard something about Index Server is obsolete to achive file listings and search. Is there any new alternative?

View 2 Replies

Web Forms :: Secure File Download / Hide File Path And Location While Downloading Files

Jan 14, 2013

I have made an application where I am displaying the .pdf , .doc , .docx  files. These files are uploading from an Admin Panel.When user place a mouse pointer on download icon provided in front of every file, it shows the complete path where it’s get saved.I want to avoid this path visibility even when user place mouse on download icon and even if it Inspect an element (as most modern browser will have this functionality).

View 1 Replies

Mobiles :: Alternative To Mobile Device Browser File?

Jan 27, 2011

Since the mobile device browser file is no longer support, what is an alternative to it that requires minimum code changes?

View 2 Replies

How To Replace Request To PDF File To Redirect To Same File In Different Location

Dec 7, 2010

I have a virtual web folder that has large number of PDF Files (Leave Forms) submitted over the past 5 years.

The users and other applications have direct references to such files and on some cases, the PDF is referenced as embedded object.

Here is a snapshot of where the PDFs are stored:

So, the direct link to the PDF will look like the following:

[URL]

Becuase the PDFs are stored under a folder under the ASP.NET Web Application, it was a bad idea.

Now, I have to move them all to another location which is simply a virtual folder outside the Web Application.

All Leave PDF Forms have Unique URLs which is:

"SessionID" + "/" + "Leave-userid-start-date.pdf"

So, I need to replace the above link with the following after I move the PDF Files. I want the replacement to happen at the time it is requested from the Client Browser. The new URL will look like the following:

[URL]

So, whether it is requester from IE from any other Object Tag or similar, then the input URL should be replaced with the new URL as shown above.

View 4 Replies

Visual Studio :: Trying To Add A Class Library To A Solution In Vs2008 But Solution Icon Disappears?

Mar 20, 2010

I'm trying to create a .NET solution and add class libraries to it. First - in VS2008 I go to File > New > Project > Other Project Types > Visual Studio Solutions > Blank Solution. Then - after VS2008 creates the blank solution I right click on the solution and select Add > New Project > Visual C# > Class Library. However, when I add the Class Library to the solution, the solution icon disappears from Solution Explorer (although the solution name is still in the VS2008 title bar). Why does the solution icon disappear
from the Solution Explorer when I attempt to do this?

View 2 Replies

Visual Studio :: Solution Explorer Not Showing Solution Name - VS 2008

Sep 10, 2010

I am stumped by a serious issue in Vs 2008.

I created a Blank solution called HelloWorld.Then I added a new Class Library project by the name of HelloWorldService.After creation of the

Class Library project the Solution name disappeared from Solution Explorer.

As a result of which I can now only add new items into the Class Library project but cannot add new item to the solution.

This appears to be a pretty old problem as I found it in another link on the internet.

[URL]

It seems to be a bug.Has MS released a patch or a fix for this.

View 6 Replies

Sitemap Randomly Breaks Over Time / Could Not Find The Sitemap Node With URL '~/Default.aspx'

Aug 2, 2010

I've been having some production runtime errors that I don't fully understand. This has happened to us on a couple different ASP.NET 4.0 Web Sites (shudders - yes, I know - we're porting it to MVC but that's taking some time).

First of all, we have never been able to reproduce this issue in development/QA environments. Secondly, upon deployment, the issue seems to be non-existent. Sometimes the issue manifests within a day or two of deployment and other times the deployment will be live for a month without it manifesting at all. However, once it manifests, then ANY page viewed under the web site causes the error. Lastly, this problem seemed to only come up once we migrated to .NET 4.0. We started at 2.0, a year ago upped to 3.5, and recently upped to 4.0 with this solution and most child projects.

The error:

Could not find the sitemap node with URL '~/Default.aspx'.

A simplified version of our sitemap (with some names changed and uninteresting nodes removed) is as follows:

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode roles="*" title="EG">
<siteMapNode url="~/../SM/Default.aspx" title="Welcome" description="" roles="*" />
<siteMapNode url="~/../SD/Default.aspx" title="SD" description="" roles="*" />
<siteMapNode url="~/../SMD/Default.aspx" title="SMD" description="" roles="*" />

[code]...

I have confirmed in all of the SiteMaps that there is a node with url="~/Default.aspx" with roles="*" (which includes public/anonymous access), so I am very confused as to why this problem occurs.

SiteMap does not have a node for Default.aspx. All of them do. SiteMap's Default.aspx node is not accessible for security reasons to the current user/role. They're all accessible to anonymous users and this problem even exists for super admin users. Passed-in URL contains querystrings (Default.aspx?abcd). I don't know if this is a problem (I sure would hope not) but once the problem manifests itself, I can handwrite the URL with no querystrings and the problem still exists.

SiteMap changes. It doesn't Service's permissions to the sitemap file. The sitemap works perfectly fine after a deployment, so unless permissions are changed in a way that IISRESET fixes, then this is not an issue. The worker process becomes globally corrupt. I don't think so. We have ~12 web sites all in the same app pool and the problem always stays confined within a single web site. Also, we have yet to have this happen to more than a single web site at a time although it has manifested itself in 4 different ones so far.

View 1 Replies

How To Open A File That Is Part Of Solution

Jul 7, 2010

I have a document that I have included in my VS 2010 solution. It is in a folder called "MyFolder" the file itself is called "MyDoc.docx". I've tried the following ways to open the file but none work:

Stream s = File.OpenRead("/MyFolder/MyDoc.docx");
and
Stream s = File.OpenRead("MyFolder/MyDoc.docx");
and
Stream s = File.OpenRead("~/MyFolder/MyDoc.docx");

What is the proper path for this file?

View 1 Replies

How Many Web.config File Does A Solution/project Can Contain

May 26, 2010

How many web.config file does a solution/project can contain?

View 6 Replies

SiteMap Change SiteMapProvider / Create Multiple Web.sitemap Files?

Jan 25, 2011

I've got a custom menu navigation built from a web.sitemap file, the first line of this would be something like:

SiteMapNodeCollection topLevelNodes = SiteMap.RootNode.ChildNodes;

However, now I want to be able to create multiple web.sitemap files, and then programmatically determine which web.sitemap file to use, but I can't seem to find out how to do this. I'm assuming I could either create one custom SiteMapProvider that can perform the logic to determine which web.sitemap file to load, or I have multiple providers, each one with the SiteMapFile property set to a specific *.sitemap file, and then switch providers programmatically before I access SiteMap.RootNode.

View 2 Replies

Web Forms :: How To Generate A Sitemap Xml File

Nov 9, 2010

How would I generate a sitemap xml file dynamically from vb.nert code?

View 1 Replies

Pass A Viewdata Into The Sitemap File?

May 18, 2010

How are you going to pass a viewdata into the sitemap file?

<%= Html.ActionLink("Home", "Index", "Home", new { id = ViewData["customRouteValue"] })%>

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved