.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

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

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :ASP.Net
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           

View Complete Post

More Related Resource Links

menu navigation in 2010 not working on 3.5 server


I have created a basic horizontal menu in MVWD 2010 which works when I debug it on my own machine. But as soon as I upload to a ASP.net 3.5 sever online, the dynamic aspect doesnt work. Are there some major differences in frameowrk 3.5 to 4?





Unable to connect to sql server in network but working fine over VPN




I have a sql server 2005 named instance running on windows 2003. I have an issue  in sql connectivity:

When the client system is in the network, client is not able to connect in management studio to the SQL server without specifiying the port number i.e. tcp: abc\xyz. If the client specifies the port number, he is able to connect to it like tcp:abc\xyz,20001.

Now the strange thing is : The same client system when connected over vpn works fine without specifying the port number in the connection string  like tcp: abc\xyz,20001.

then why is it failing to get the port number when the system is in the network?

I verified sql browser service. it is running fine. Firewall is in stopped state. What new components would come into picture over vpn that allow browser to service the port number? It's pretty strange issue and hence looking for any thoughts.

Note: SPN is not registered for the sql service.


CSSFriendly Menu Not working on publishing to Server 2003+iis6


Apology for repeated posting. This was posted by error on Configuration and deployment forum:
After months of work I thought I had finished with my web application using VS2008 with CSSFriendly menu. On publishing, the menu did not work and I got all sorts of errors. Deleting  CSSFriendlyAdapters.browser in App_Browsers folder improved the layout but the menu was not rendered with css even though the html source shows thet are linked. On desperation, I changed the target Framework from 3.5 to 2.0 and then back to 3.5 with no avail. I really appreciate any help on this - I canot afford to lose another day on this problem.

Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


Not working on Windows Server 2008




I had the CSS friendly adapters working great on our old server (windows server 2003 - 32bit) and now we have moved to a 64 bit environment and now I can not get the CSS friendly adapters to work.

We are using SharePoint 2007.

Is there another work thru for 64bit environment.

I notice windows server 2008 has a directory  C:\Windows\Microsoft.NET\Framework64 would I be using the browser file in this directory???

Please help!

In sharepoint excel working fine in office 2007 but not in office 2010


Hi All,

we receive error  while trying to create excel sheet using the template we have uploaded on the SharePoint 2007.


This occurs on a machine that has Office 2010 installed. Earlier the machine had Office 2007 and everything was working fine.


Can you let me know why is problem is coming and how to resolve this.



Sanjeev Tiwari


Office Sharepoint Server Search not working but Windows Server Search is.

I am having an annoying Issue with the Sharepoint 2007 Enterprise search functionality. I cannot get the Search Centre to work, the out of the box webparts crash the page except the Searchbox when the others are closed. The event viewer shows up numerous Errors (Office Sharepoint Server - EventID 7080) returns with and the same when trying to add a search related web part (e.g. core.results, federated etc). EventID 6398 - Timer is a regular as is 7080. Details below.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).

Remote connections are connected, I am not 100% on the Instance name, (how would I go about checking this?)

Also I cannot access the link to SharedServices1 - Open Shared Services Admin site (not clickable), guess it's permissions but I seem to have full site permissions, I think I need SSP-Admin to make more edits to the Search, maybe this is related :s

Both Search Servers are runnig, I have tried everything I can think of to fix this and allow the Search Centre to work.

I am running Sharepoint 2007 on SQL Server 2008.

Cannot export from a Report in SharePoint integrated mode in a server hardend environment


We have installed Reporting Services 2008 integrated with MOSS with SQL Server 2008 on a 64 bit platform.

The environment has worked fine in test (but the servers are not hardend).

With the production environment, any attempt to export from a report into another format (eg excel, tiff etc) results in an unexpected error within SharePoint requiring closing the browser and reopening.

There are no details behind the error. We can also find no traces of the error within any of the logs (SharePoint, Reporting Services, Windows event log etc)

When the report is opened directly from Reporting Services (ie http://servername:8080/reportserver) the report exports fine. Similarly, if the report is opened directly from Report Builder 2, or through opening Report Builder 2 from SharePoint there is no issue. This issue only happens when the report is invoked directly through SharePoint.


We can only assume that this issue has something to do with server hardening/UAC as we have

Hi this method is working fine need filter how


private void GetData()
        for (int i = 0; i < Gridview1.Rows.Count; i++)
            DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
            DataRowView drv = dv[i];

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.

Web Part working fine on the top-level page but 'Not Safe' error on lower-level pages.


I have created a Web Part which reads and parses the SharePoint logs in order to display usage information of the page it resides on.  The Web Part works perfectly on the top page, reading and displaying the information desired.  However, once the Web Part is added to any page lower in the site heirarchy (sub-page) the same Web Part throws the following error:

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Show Error Details
Hide Error Details

[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.]
  at Microsoft.SharePoint.ApplicationRuntime.SafeControls.GetTypeFromGuid(Guid guid)
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts)

Of course the current version of the Web Part is in the SafeControls list on the web.config.

The Web Part was originally designed to return site activity only for the top default.aspx page and worked fine but started to fail in the manner described above once I added the following line of code to return a SPCo

wpf datagridview checkbox column selection not working fine.

Hi Experts,in my c#.net windows based wpf application i added  a datagridview.dynamically i added checkboxcolumn to that datagridview DataGridViewCheckBoxColumn cbCol = new DataGridViewCheckBoxColumn(); GridSource.Columns.Add(cbCol); and another column is string. to this column am hardcoding the values DataTable _datatable = new DataTable(); _datatable.Columns.Add("Name", typeof(string)); _datatable.Rows.Add("CSRs"); _datatable.Rows.Add("Customers"); GridSource.DataSource = _datatable; till here fine am getting two columns (checkbox and Name)when i am trying to check those checkboxes problem comming.am trying to get the count of the checked rows for that i used below code int cbcount = 0; foreach (DataGridViewRow _dgRow in GridSource.Rows) { if ((bool)_dgRow.Cells[0].Value) cbcount++; } cbcount will give the checked count.but the problem raising here if i check 2 rows it giving 1if i check 5 rows it giving 4if i check 1 row it giving me 0means am getting n-1 resultwhere i did wrong??

Indexing services on window server 2008 is not working with .net

Hi, I am useing Microsoft indexing services in windows 2008 64 bit .I am getting error like "Exception from HRESULT: 0xC0000005" while i am createing  new catlog from .net 2.0.I am using  "ciodm.dll" for adding new catlog. i am using this code for create new catelog.   Dim Admin As New CIODMLib.AdminIndexServer   Admin.AddCatalog(varContractNo, txtCatelog.Text + "\" + varContractNo) Admin.Stop() Admin.Start() AddScope(txtDocFolderPath.Text, txtSite.Text, txtCatelogname.Text)   Please help me anybody have fixed this issue on window server 2008 64 bit.  

clr assembly in sql server - working directory? and exception question

Hello, I have a small assembly in sql server 2008... it's pretty simple, but in the very rare circumstance that it may throw an exception I am catching it and writting to a log file. something like: using (StreamWriter sr = new StreamWriter(@".\ErrorLog.txt", true)) { sr.WriteLine("{0:G} ===> {1}", DateTime.Now, ex.Message); } I believe that should write the file to the working directory... 1. what would the working directory be for sql server 2008? the binn directory? 2. what would happen if a clr assembly added to sql server throws an exception that is not handled by your clr code?

SQL Server 2005 - Installation in Cluster Environment - "Service SQL Server Browser (SQLBrowser) fai

Windows Server 2003 R2 Enterprise Edition SP2 32-bit All updates and patches installed Two-node cluster environment configured. Cluster functions perfectly. Trying to install SQL Server 2005 Enterprise Edition (32-bit) as a clustered application. Installation proceeds fine until it begins to install the SQL Server Database Services product. Status window says "Starting Services. Service: SQL Server Browser". Error message is presented: "Service 'SQL Server Browser' (SQLBrowser) failed to start. Verify that you have sufficient privileges to start system services". SQL Server Service Account is in the Administrators group on both local systems, and is a domain account. Account used for the installation is in the Administrators group on both local systems, and is a domain account. Have cancelled out of the install and rebooted both servers numerous times. Exact same error continues to occur. Cluster is active and all resources are owned by node #1 - the node where SQL Server Installation is being run. In the event viewer, I see: Event ID: 10 Description: The SQLBrowser service was unable to establish SQL instance and connectivity discovery". I am also seeing errors like: Source: SQLBrowser. The SQL configuration for SQL is inaccessible or invalid. Source: SQLBrowser. The Configuration of the AdminConnection\TCP protocol in the SQL instance xxxxxx i

Network failure in Cluster Environment,will it stop the SQL Server Instances?

Hi All I have problem with cluster Environment that is there is network failure in Cluster Environment,will it stop SQL Server Instances Event viewrer Information 6:22:09 The MSSQLSERVER service entered the stopped state. 6:22:05 The MSSQLSERVER service was successfully sent a stop control. 6:22:04 The SQLSERVERAGENT service entered the stopped state. 6:21:43 The node lost communication with cluster node 'MSSQL0002' on network 'LAN'. 6:22:02 The SQLSERVERAGENT service was successfully sent a stop control. 6:22:02 Cluster resource 'SQL IP Address1(SQLCLUSTER)' in Resource Group 'SQL' failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'Cluster IP Address' has failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'Cluster IP Address' has failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'MSDTC IP address' has failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'MSDTC IP address' has failed. 6:22:02 The TCP/IP interface for Cluster IP Address 'SQL IP Address1(SQLCLUSTER)' has failed. 6:21:58 The TCP/IP interface for Cluster IP Address 'SQL IP Address1(SQLCLUSTER)' has failed. 6:21:58 Cluster network 'LAN' is operational (up). All available server cluster nodes attached to the network can communicate using it. 6:21:58 The interface for cluster node 'MSSQL0002' on network 'LAN' failed. If the condition persist
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