.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

Employee name change causing weird issue...

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

Recently, one of our female employees got married and changed her last name.

old login:


new login:



The problem is that even with her new login name (domain\nnew), when she goes to a web page whoes sole job is to display the current logged in user logon name [HttpContext.Current.User.Identity.Name], it shows... domain\mold.

Also, the PC she is using is brand-new. In other words, the PC was build after her name change. So, there isn't any conflict on the PC itself. I am puzzled at this point.

Thanks for any help


View Complete Post

More Related Resource Links

Weird Date vs Date/Time issue using a calculated column

I'm attempting to use the fab 40 attendance template. I don't need the time to show - Im able to hide that on the forms with jquery (endusersharepoint.com thank you!!) I WAS ATTEMPTING to create a calculated column called Start Date where the formula simply reads '=[Start Time]' When it's set to display 'Date Only' the date is off by a day. If I switch it to 'Date & Time' I get the correct date. Huh?

Weird Issue with the MOSS Search : FileExtension metadata object type instead of string

Hello, We 've got a strange issue with the search and especially with the FileExtension metadata. when we make a query on the search engine, we receive for the FileExtension metadata an unexcpected result. here is a printscreen showing the issue. http://cid-53eee937847a625e.photos.live.com/self.aspx/Public/Untitled.jpg as you can see the Type of the FileExtension is object and it should be string and I checked the type of the object and it's System.String[] the element at the index 0 contains the value! what's wrong ? thx in advance

Weird Issue with the MOSS Search

Hello, We 've got a strange issue with the search and especially with the FileExtension metadata. when we make a query on the search engine, we receive for the FileExtension metadata an unexcpected result. here is a printscreen showing the issue. http://cid-53eee937847a625e.photos.live.com/self.aspx/Public/Untitled.jpg as you can see the Type of the FileExtension is object and it should be string and I checked the type of the object and it's System.String[] the element at the index 0 contains the value! what's wrong ? thx in advance      

Windows.Forms.Label size change issue



In a Windows Forms application developed with VB2008 Express, Label controls change size the first time the .Text property is updated.


On a Windows XP Pro SP3 system where the app was developed the labels retain the size set at design time.  On other systems, one also Windows XP, one Windows 7, labels shrink (all to the same size independent of content) the first time their .Text property is updated.  Labels that do not have their .Text property updated retain their design size.

Additional information:

The labels all occur within a FixedPanel of a SplitContainer.
Salient properties for the Label controls:
Anchor: Top, Left
AutoSize: False
BorderStyle: FixedSingle
Dock: None
Enabled: True
FlatStyle: Standard
Image: None
Locked: False
Margin: 0,0,0,0

Weird serialization DataContract issue




I am having very weird issue where values submitted by WCF client are not serialized. I have tested the DataContracts by using DataContractSerializer to serialize and deserialize Object to/from xml file and there are no issues.


Due to the commercial nature of the project I am unable to post the actual code but following illustrates the structure:


public class Person
  private string name;

  public string Name { get { return name; } set { name = value; }}

  private Place location;

  public Place Location { get { return location; } set { location = value; }}

public class Friend : Person

Weird issue with AutoCompleteExtender



I have a Search as you type textbox that has been working great, but I just found a case where it is not working as intended. On a majority of names I am searching for, it works correctly. For example, if I was searching for Clark Kent, and typed in Kent it would pull up Clark Kent,  I could click on it and everything would be good. 

In a few names I have been typing in and it will "tack" what I am typing onto the names and not correctly get the ID. For example if I was searching for the name "Superman All American Hero" and I typed in Superman. I would see the following on my list

superman Superman All American Hero. It is not doing this for all names, just for random ones. Any Ideas why this might be happening? I am using a web Method to get the searches. It looks like this:

    <WebMethod()> _
    <ScriptMethod()> _
      Public Function GetNameList(ByVal prefixText As String, ByVal count As Integer) As String()
        Dim SelectQry = "select * from Superheros where Name like '%" & prefixText & "%'"
        Dim Results As New List(Of String)()
            Using Command As New SqlCommand(SelectQry, Connection)
                Using Reader As SqlDataReader = Command.ExecuteReader()
                    Dim Counter As Inte

WebBrowser.Document.ExecCommand(..) causing input method to change


I am making an IM client, and I've used the Forms WebBrowser control as a WYSIWYG-like editor. Unfortunately I also have to support alternative input methods, like Japanese and it's causing me grief.

To clear the editor after sending a message I call the following on myWebBrowser control:

myWebBrowser.Document.Body.InnerHtml = "";
myWebBrowser.Document.ExecCommand("FontName", false, _selectedFont);
myWebBrowser.Document.ExecCommand("FontSize", false, _selectedSize);

This works for English languages, but for Japanese this causes the input method to change from hiragana back to English characters. 

Does anyone know how I can set the font without breaking the set input method?



ssis deployment issue - Unable to load custom dll - due to change in Sql server installation


Hello all

I had a strange issue in testing my package, after it was deployed to a Test server.

The details of the server

Sql 2005 is installed, in the D:\ drive

I have used a package, where i use a custom DLL to read values. Hence, i added that DLL to the GAC. I was in the assumption that this should complete my proceess of deploying this package.


However once i executed the package, i got an error - Could not load the Helper object.

Unable to CAST "system.object"  to namaspace.class.Helper.


I reviewed the setting on my macihine, since as part of development inorder to reference the dll i added this to the C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies location so that i can reference this from BIDS. I checked that location in my test server, i was not present. This location was present in the D: drive ( i assume this was present since i installed my complete SQL Server in the D:\ ). I copied the dLL in that location and added it to GAC from that location. My package still failed with the same error.


To resolve this issue, i created the same path in the C:\ folder as C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies

assemblies was newly created in C: and i added the dll to GAC from there. Now my package worked.


Issue with name change in SharePoint 2007



We recently had a user that was married change her last name. Her account was just renamed. We normally copy the account and issue a new user name/password. After the name change, the user could not correctly submit SharePoint 2007 forms. They would appear to be sent correctly, but looking into the situationm they did not appear in pending requests and managers were not emailed.

I just wanted to know the process of correcting the SharePoint access for the user.

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

Selected to change the background color of the page



As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



SqlDataSource how to change the stored procedures at run time



Is it possible to change the select, insert and update stored procedure of an SqlDataSource at run time. I don't mean to change the definition of the stored procedure, but I mean to change the assignment, i.e. To change the select stored procedure from "selectSP1" to "selectSP2" at run time. Is it possible?



xpath issue


Hi i am using xpath to loop through each node,

the xml is below i can get the value of "link" but i cant get the thumbnail value, have you got any ideas how i can do this, my code is below.



     <link>test 1</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />



     <link>test 2</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />


public void FindLinks(XPathNavigator p_xPathNav, DataTable dt)
            //run the XPath query
            XPathNodeIterator xPathIt = p_xPathNav.Select("//item");

            //use the

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