.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Menu works locally but not on server

Posted By:      Posted Date: October 10, 2010    Points: 0   Category :ASP.Net

I have a menu that uses a sitemap.  The menu works locally, but not on the server.  Below is my code for the menu, data source, and the sitemap.  Any idea why I can run it locally and use the menu, but I cannot use the menu on the server?   


<asp:Menu ID="horizontalMenu" runat="server" DataSourceID="SiteMapDataSource1" StaticEnableDefaultPopOutImage="true"
DynamicEnableDefaultPopOutImage="true" Font-Size="Small" Orientation="Horizontal">
     <StaticMenuStyle CssClass="primaryStaticMenu" />
     <StaticMenuItemStyle CssClass="primaryStaticMenuItem" />
     <StaticHoverStyle CssClass="primaryStaticHover" /> 
     <DynamicMenuStyle CssClass="primaryDynamicMenu" />
     <DynamicMenuItemStyle CssClass="primaryDynamicMenuItem" />
     <DynamicHoverStyle CssClass="primaryDynamicHover" /> 

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Bold="False" Font-Names="Verdana" Font-Size="9pt" PathSeparator=" | " ParentLevelsDisplayed="5">

View Complete Post

More Related Resource Links

'Sys' undefined .NET 4 AJAX works locally but not on server

If you recently created a .net 4.0 site and AJAX doesnt work when on the server, read below.
I was going out of my mind looking for a resolution to this problem. My AJAX enabled website worked great on 
my local computer, but as soon as I uploaded it to the server. BANG!!! I no longer had any AJAX. I would get the 
error: 'Sys' undefined. I finally found the resolution and figured it should be shared.
I spent 2 days doing everything that I could find. This is the only thing that fixed my prob.  
ADD, the following to your web.config and it may fix your problem. It did for me.
     <modules runAllManagedModulesForAllRequests="true"/>
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" pa

HttpHandler works with Visual Studio Development Server debugging, but not otherwise


Hi all,

I'm new to HttpHandlers.  I am writing an HttpHandler that reads uploaded files directly from the request stream to provide progress that can be queried using an AJAX request.  For large files, this seems to be faster than having ASP.NET load the file contents into Request.Files and then streaming the file from there to wherever it goes (Linq to SQL into a VARBINARY column in an SQL Server database.)

My HttpHandler works perfectly when I'm debugging using the Visual Studio Development Server, but doesn't work otherwise.  The application pool for this application in IIS 7 is set to run in Classic Mode, and the Handler Mappings screen in IIS says that I must manage managed handlers in system.web/httpHandlers. 

I set up in my applications Web.config file.

<add verb="GET,POST" path="*.upload" type="Namespace.For.UploadHandler, AssemblyForUploadHandler"/>

It works great, so long as I don't debug with the "Use Local IIS Web server" option.

What else do I need to do to get this to work?


Displaying the Server Ribbon and Site Actions Menu on Customized Search Pages Upgraded to SharePoint

Learn how to add the Site Actions menu and SharePoint Server ribbon to SharePoint Server 2007 search pages that you upgrade to SharePoint Server 2010 by using visual upgrade.

Can't connect to SQL 2005 Enterprise using Management Studio with Server Name (only (local) works

This is a test system, everything running locally & no domains. Win 2003 Ent. Server & SQL Server 2005 Enterprise. I can't log into SQL Server Management Studio using the server name & using either Windows Authentication or SQL login. If I change the name of the server in the drop-down list to "(local)", I connect just fine (both Windows & SQL security modes). Shared Memory, Named Pipes & TCP/IP enabled in both server & client. Remote connections allowed. I have IP adresses (both & external IP) in my hosts file pointing to the server name. Does SQL require a DNS server? This wouldn't be a problem except for the fact that I can't install SQL 2005 SP3 due to authentication failure since there's no way to enter (local) as the server name. SQL tools (management studio, SP install) seem to see the SQL server running but won't authenticate the user through any means other than setting server name to (local). This is driving me crazy!!!

First Development Program with SPSite, SPWeb and SPList works only locally but not in farm

Dear All, Here is a piece of code which wrote in a VS 2010 with Standlone Sharepoint 2010 in Windows 7 64 bit and it works fine. Private Shared _SiteURL As String     Private Shared Sub Initialize(ByVal SiteURL As String)                 _SiteURL = SiteURL         Using sc As New SPSite(_SiteURL)             Dim spWebSite As SPWeb = sc.RootWeb             _AllSPList = New List(Of String)             _HiddenSPList = New List(Of String)             _VisibleSPList = New List(Of String)             For Each item As SPList In spWebSite.Lists                 _AllSPList.Add(item.Title)                 If item.Hidden = True Then                     _HiddenSPList.Add(item.Title)             &nb

SharePoint 2010 AD FS 2.0 Integration - login works then fails, looping back to the adfs server

Hello, I setup SharePoint 2010 Claims auth with AD FS 2.0 following this post: http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx.  I have no access to the ADFS server, but I think they followed the steps as outlined.  If I do an iisreset (or just recycle the app pool of the SharePoint site) I can login successfully using the remote credentials.  Also I can under security in SharePoint search for and find users and roles from the remote ADFS server. If I close my browser, open a new browser and go to the site I am prompted to login again (this is fine).  I do, using the same credentials, and the login fails because I am redirected between the SP and ADFS servers until the ADFS server stops the redirecting.  I have been doing some digging and I found this post: http://blogs.technet.com/b/speschka/archive/2010/08/09/setting-the-login-token-expiration-correctly-for-sharepoint-2010-saml-claims-users.aspx, which describes the situation I have in point # 3 at the bottom.  I have tried setting the token time out as low as 1 second but this hasn't helped. I have also, just to see, tried setting all the other lifetime settings to 1 second - but no luck.  Because the initial login works I think the setup is correct, but something is maintaining some state that is causing the loop

HttpWebRequest NTLM auth to secure server only works in .NET 4

Hi, I am trying to connect to a secure server via a proxy server which requires NTLM authentication, somewhat similar to http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/a4aba6c5-6180-441e-ab60-95347fcdc051 The test app below fails with a 407 error when target framework is set to .NET 2, 3, or 3.5, but succeeds w/ .NET 4: static void Main(string[] args) { WebProxy myProxy = new WebProxy(); myProxy.Address = new Uri("http://testproxy.here.com:3121"); myProxy.Credentials = new NetworkCredential("proxyuser", "password", "testproxy.here.com"); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri("https://testserver.here.com/sessions")); request.Method = WebRequestMethods.Http.Post; request.ProtocolVersion = new Version("1.1"); request.Credentials = new NetworkCredential("username", "password"); request.Proxy = myProxy; allDone.Reset(); request.BeginGetResponse(new AsyncCallback(GetResponseCallback), request); allDone.WaitOne(); } private static void GetResponseCallback(IAsyncResult asynchronousResult) { HttpWebRequest httpWebRequest = (HttpWebRequest)asynchronousResult.AsyncState; HttpWebResponse httpWebResponse = null; try { if (httpWebRequest.HaveResponse == true) { httpWebResponse = (Htt

Hide top menu search bar in Sharepoint server 2010

Hi I've tryed this guide to hide the top menu search bar with Sharepoint Designer in Sharepoint server 2010 ------------------------------ Open SharePoint Designer          Open the site in SharePoint Designer   On the left navigation pane, click on “All Files” (bottom item on menu)   Click on the folder “_catalogs”   Click on the folder “masterpage”   Click on the file “v4.master” An overview will open Make sure that you have selected “Split mode” viewing          Click on “Edit file” (I hope this is correct, because I have a Dutch version)          Select “Skewer click” on the ribbon          When you click on a item, you are presented with a submenu. Select in this case, the Help-button, “a#TopHelpLink” For the Search-field, you have to select “div#s4-searcharea.s4-search s4-rp”.          In the code properties screen, on the right side, select Style          And set visibility to “hidden”   Save your master file. ------------------------------ But it dosn't work, it puts a little red line under "hidden", Like if y

MSDTC - TransactionOption "Required" works from my XP Workstation but not from our 2008 Server

I have a SSIS package (2008) that has a sequence container with TransactionOption Required.  This is needed to ensure that multiple tasks commit or fail together.  It also has a custom transformation that establishes (acquires) connection objects. This package works great when run from my local XP workstation.  I can see the distributed transaction starting and committing in the SSIS output. The problem is that when I roll this package out to the server, it fails to acquire the connection, throwing an error at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectinoMAnager100.AcquireConnection(Object pTransaction).  I've verified that the security settings of MSDTC on this server are consistent....they are definitely set to allow inbound and outbound. Are there any issues with MSDTC on Windows Server 2008?  Is it possible that I'm getting an issue because my workstation is 32 bit but the server is 64 bit? Thanks -Mark

Print control works on reporting server, but not in embedded in application

Hi,I am having an issue where if I click on the print icon in the report viewer embedded in an application, I get the error "unable to load client print control".  However, when running through report manager, this is fine.  I am running SQL Server 2005 SP3 and report viewer 9.Any thoughts would be much appreciated.

asp menu working fine in the dev environment but not on server

Hi guys,        I am sorry to be asking what is probably a really stupid question, but i have a problem with my asp menu, when i run it on my dev machine(thru vs2010) it works perfectly, all the menu's are displayed correctly with the correct child items in the correct order but when i publish it to the server all the menu items become flat and take up the whole page. I am populating the menu using a reentrant function as follows to call the function and add the menus i am using Dim childMenuItems As List(Of MenuItem) = CreateMenuLevel(0, uniquemenulist)childMenuItems.ForEach(Sub(n) NavigationMenu.Items.Add(n)) Public Function CreateMenuLevel(ByVal parentId As Integer, ByVal menulist As List(Of MenuList)) As List(Of MenuItem)        Dim menuItems As New List(Of MenuItem)        For Each menuListItem As MenuList In menulist.Where(Function(n) n.ParentId = parentId)            Dim MenuItem As New MenuItem            If (Not String.IsNullOrEmpty(menuListItem.PagePath)) Then                MenuItem.NavigateUrl = menuListItem.PagePath           

SOS: Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But networ

Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But network connection is successful.   But SQL Server Logins contain   BUILTIN \ Administrators, and                                                    BUILTIN \  Administrators contain DOMAIN \ Domain Admins, and                                                    DOMAIN \ Domain Admins contain DOMAIN \ myname.   Creating SQL Server Login with DOMAIN \ myname entail successful local connection.   Removing SQL Server Login with DOMAIN \ myname and creating SQL Server Login with DOMAIN \ Domain Admins do NOT entail successful connection. Cannot connect! System:   Windows Server 2008. Error 18456

Cannot connect to SQL Server 2005 locally by Windows Authentication, but network connection is succe

Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But network connection is successful.   But SQL Server Logins contain   BUILTIN \ Administrators, and                                                    BUILTIN \  Administrators contain DOMAIN \ Domain Admins, and                                                    DOMAIN \ Domain Admins contain DOMAIN \ myname.   Creating SQL Server Login with DOMAIN \ myname entail successful local connection.   Removing SQL Server Login with DOMAIN \ myname and creating SQL Server Login with DOMAIN \ Domain Admins do NOT entail successful connection. Cannot connect!                                     &

sql server not connecting locally



i installed sql server enterprise edition in my laptop(windows 7 operating system) ,i am unable to connect in my local database using servername:localhost or systemname,should i install server and client tools as well.please give me a solution ,i struck here from long time.

thanks in advance,




RijndaelManaged works on workstation, not on server


I have a project that uses the RijndaelManaged class for encryption/decryption.  It works fine on my workstation (xp 32-bit), but when it gets deployed to Windows 20008 Server (64-bit), it gives the following error:

"Specified key is not a valid size for this algorithm."


run report server (rdl) locally in windows app


Hi! I developed a report server using business intelligence studio and the datasource for this report is the data warehouse (using cube)

my reports runs fine and i can preview data in BIDS. My question is: is it possible to copy this report and put it in a windows application and set the mode to local instead of remote.  I got it to display the report in reportviewer using remote mode.  Is there a sample that shows how to display an RDL report(that is using the cube as datasource) in reportviewer?

ETL package runs locally but fails on server



I am working on an ETL package which reads the data from text file, validates the data and puts it in relevant tables of the DB.

It was working fine until recently I had to make some changes in it. When run the package on local environment, everything worked fine.

When I uploaded the package on server and started testing it, it gave me error. I am passing information like ConnectionString, filepath through user variables. The package is executed by a windows service on server which passes these parameters to the package.

I double checked to see if the values in config file of the windows service are correct but unable to find what is wrong.

Can any one please give me a hint on this? 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend