December 2004 - Posts

Implementing whidbey's membership management and profile management in ASP.NET 1.x applications.

Do you want to implement membership,role based authorization and profile management in asp.net v1.1 applications. You can use Microsoft ASP.NET v1.1 Membership Management Component Prototype(MMCP). MMCP contains classes that allow a developer to more easily authenticate users, authorize users, and store per-user property data in a user profile. You can download this component from this location.

This is the same functionality which is going to come in ASP.NET Whidbey. But there will be few changes in this functionality in whidbey, hence during migration to whidbey you need to do few changes.

To know more on this, read these blogs
1. Scott Watermasysk blog
2. Scott blog
3. Kent Sharket blog

 

with 0 Comments

Facts about storing objects in Sessions, Cache, Application....

Rick Strahl's has done a test on storing objects in sessions and cache. He has given interesting information about this in his blog.

Fact is, When you store reference object like dataset in session or cache. It is storing a live reference of that object in session or cache. Therefore whenever you do some changes to that object, it will be reflected in session and cache objects. We can understand why it is happening in case of inproc mode for session. However interesting thing is, it is also happening when you have sessions stored in sqlserver or out of process. Though the objects are serialized in case of stateserver and sqlserver mode, it is behaving like inproc mode. To know why it is happening and to know about Rick Strahl's test on this, read his blog.

with 0 Comments

Session on ASP.NET Tips And Tricks in BDotNET

Yesterday I took a session on ASP.NET Tips and Tricks in Bangalore .NET User Group(BDOTNET). Along with me, Sridara took a session on Regular experssion in .NET.  Since it was a Christmas eve, I thought there wont much response for these sessions. Nevertheless around 50 people turned up for the session. Some of the tips and tricks which I covered in this session are

  1. Progress bar in asp.net
  2. Scrolling datagrid with fixed header and sorting
  3. Customizing Pager section
  4. Setting focus, showing messagebox
  5. ASP.NET Path tips and tricks
  6. Disabling viewstate in Datagrid
  7. Best practices for adding dynamic controls
  8. Maintaining scroll position and few more....

You can download the presentation and demo from this location.

with 0 Comments

New version of Team Foundation Installation Guide

Latest team foundation installation guide (1.0.41222) for Visual Studio 2005 Team System December CTP release can be downloaded from this place,

http://www.microsoft.com/downloads/details.aspx?FamilyId=E54BF6FF-026B-43A4-ADE4-A690388F310E&displaylang=en

 

 

with 0 Comments

Microsoft Acquires Anti-Spyware Leader GIANT Company

Microsoft Corp. today announced that it has acquired GIANT Company Software Inc., a provider of top-rated anti-spyware and Internet security products. Microsoft will use intellectual property and technology assets from the acquisition to provide Microsoft® Windows® customers with new tools to help protect them from the threat of spyware and other deceptive software. In addition, key personnel from GIANT Company will be joining Microsoft's security efforts..
with 0 Comments

Bill Gates Answers Most Frequently Asked Questions

 Microsoft Chairman and Chief Software Architect Bill Gates answers the questions he is asked most frequently, including the secret to his success. Check out this link
with 0 Comments

SQL Server 2000 Reporting Services Installation in 2003 server

Today I tried installing Reporting services in my machine. After two attempts, I installed successfully. These are my learning's from this installation...

1. SQL Server Reporting services require SQL Server SP3a  for SQL Server 2000. Install that first. You can dowload this from the following location.

http://www.microsoft.com/sql/downloads/2000/sp3.asp

After installing, do a reboot.

2. If you have installed whidbey or longhorn bits, then you need do some registry hack. Otherwise Reporting services will give an error “ASP.NET v1.1 not Installed” so it wont install server components. This error is coming because when you install whidbey, ASP.NET version is mapped to 2.0*.. However reporting services requires 1.1 only.. I dont why such requirement is there as 1.x ASP.NET pages will work in 2.0 version also..

To avoid this just change this reqistry setting,

\\HKLM\SOFTWARE\Microsoft\ASP.NET\RootVer] = "1.1.4322.573"

For more details, refer this blog

3. If you provide service account for running reporting service, then you will get a error “install an hotfix XXXX if you want to run this service in NT Service account”.. To avoid this give any domain account credentials.

4. After you install reporting service, install reporting service service pack1. you can download it from here,

http://www.microsoft.com/downloads/details.aspx?FamilyId=580FEBF7-2972-40E7-BCCF-6CD90AC2F464&displaylang=en

 

with 0 Comments

XMLHTTPRequest --> Client Callback in Whidbey --> Google Suggest ---> ?????

In my previous project, we used XMLHTTP request object extensively to submit the web page without refreshing that page. It is a very nice feature, which is required in most of the projects. During those days, I thought why this feature is not used by many people. One reason might be, it was not supported by all the browser at that time.. Now i think most of browsers provide an option to achieve this Microsoft.XMLHttp object in IE and XMLHttpRequest in Netscape.. That is why its been used extensively now,

In Whidbey, Microsoft is using this feature to implement Client Callback mecahnism and google is now using this feature for implementing Google Suggest.

To know  how Google Suggest works, check out this blog. If you want to take look at javascript file which does this job, then download it from here...

with 1 Comments

Debugging User Security Context

Most of the times we come across a situation where we need to find in which user context the debuggin thread is running. It is not a easy task till whidbey. In whidbey there is a concept called pseudo -register, in which they are introducing a fake variable $user which can be evaluated in any watch windows. This variable will give information about security context of the debugging user. Information including name, user sid, loggin id, whether impersonation is enable or not, security privileges and groups of that user can found using this variable. For details about this, check this msdn blogs

http://blogs.msdn.com/shawnfa/archive/2004/09/23/233665.aspx

http://blogs.msdn.com/greggm/archive/2004/12/11/279978.aspx

 

 

 

with 0 Comments

Configuration settings for web site administration tool in whidbey

Configuration settings for web site administration tool are stored in machine.config file in <WebsiteAdministrationTool> section. Sample configuration of websiteadministration tool is show below

<webSiteAdministrationTool 
defaultUrl=”/aspnet_webadmin/2_0_40607/default.aspx”
enabled=”[true|false]”
localOnly=”[true|false]”
     >
      <categories>
            <category navigateUrl="default.aspx" title="Home" />
            <category navigateUrl="security/security.aspx" title="Security" />
            ….
      </categories>
 
      <authorization>
            <allow users="*" applicationPath="*" />
      </authorization>
  </webSiteAdministrationTool>


Default url is the url where web site administration tool is installed, by default it is /aspnet_webadmin/2.0*. Localonly attribute is for mentioning whether this site can be accessed only in local machine.(i.e. using http://localhost). Authorization element is for setting authorization setting for this web site.  If you want to allow only administrators to access this tool, then you can configure here. Categories element is to register the categories tab which appears in this tool. You can add your own tab, in which you can allows users to do some administration task specific to your web site alone.

Updated on 22/1/05 : Removed physicalPath from WebAdministrationTool settings.

with 0 Comments

Solution: Unexpected error during portfolio creation in Visual Studio Team System.

After I installed foundation server successfully, I tried creating portfolio project in VSTS. Portfolio project was created successfully, but with the following error. 

unexpected error.:SyncWithAD_Lookup was unable to get a domain for <domainname>\<username>

SyncBisTree: ChangerId is NULL 

Due to this error I couldn’t create any workitem in that project. I thought this error is due to some wrong configuration of domain user name in foundation server. For more than two days I tried various options like changing identity for foundation server, for IIS, and running foundation server in administrator account and many more… but I couldn’t solve the problem…  

Then instead of trying all this options, I opened the project creation code of VSTS using .NET Reflector. Thanks to Lutz Roeder. I traced the problem with the help of stack trace of the exception. I was surprised to see that problem is not in the application tier of foundation server, it’s in data tier. I started the SQL Profiler, and again I created the portfolio project to trace the exact SP in which I am getting this error. Finally I found out this error is coming in SyncWithAD_Lookup SP in pssshared database. Luckily this SP is not encrypted. So I could get the text of Stored Procedure.  

In that SP, they are trying to check the domain details of the logged on user. But the assumption in that SP is that, email nick name (saravanak in saravanak@abc.com) and logged in user name should be same. I just commented the code that verifies this assumption, I could create portfolio project without this error. But I got Security exception error. This error was also coming because of same reason, but I couldn’t read the SP which is raising this error as it is encrypted. Then I opened the Table “ADObjects” which is storing details about user account. I updated that table so that mailnickname and logged on user name to same value. After that I could create portfolio project without any error. 

I don’t know why VSTS team is assuming mailnickname and login name should be same or did I missed anything during foundation server installation. I am not thinking too much on that, as I am able to play with VSTS now without any problems.

with 2 Comments

Physical Server to Virtual Server.

After working in Virtual machines you might think whether it is possible to create virtual image file out of any physical server. Yes, it is possible.

Microsoft have released Virtual Server 2005 Migration Toolkit (VSMT) Beta tool for this purpose. This tool can be used to automate the migration of OS from Physical server to Virtual Server. You can download this tool  from this location

http://www.microsoft.com/windowsserversystem/virtualserver/evaluation/vsmt.mspx

This tool is still in beta, so if you find any bugs. You can report at this place.

http://www.microsoft.com/windowsserversystem/virtualserver/evaluation/vsmtbeta.mspx#ECAA

Note: This tool can not be used to migrate a physical machine to virtual PC. This is only for virtual server 2005. This tool can not be used to migrate virtual server to physical server also.

To know more about VSMT, read this faq.

http://www.microsoft.com/windowsserversystem/virtualserver/evaluation/vsmtfaq.mspx

If you face any problem when you move from physical to virtual machine. Read Ben Armstrong blog. He is the program manager of Microsoft Virtual Machine Team. He is giving many tips on how to migrate a physical machine to virtual machine

 

 

with 0 Comments