PROBLEM DESCRIPTION===================Asp.net Membership control issue: when I create users and roles by wizard the default database is sql server express and the file is aspnet.mdf, but in my case I have my own database which store the users detail. I want to use the membership control functionality but don’t want to deal with 2 databases; also, I want to add my table to the default database thus changing the schema.I expect the Asp.net Membership provider to support that change and want to know what should I change in the application code SUMMARY of TROUBLESHOOTING==========================“How to: Use membership in ASP.NET 2.0” at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000022.asp, in particular the section “Using the SQLMemberShipProvider”; basically you need to configure Forms authentication, install the membership database and configure the SqlMembershipProvider. Step 2. Install the Membership DatabaseBefore you can use the SqlMembershipProvider, you must install the SQL Server membership database.To install the membership database, log on to your server with an account that has authority to administrate SQL Server (such as the Administrator account). Open the Visual Studio 2005 command prompt, and run the following command: aspnet_regsql.exe -E -S localhost -A m Where: -E indicates authenticate using the Windows credentials of the currently logged on user-S (server) indicates…
-
-
Unable to get the private bytes memory limit for the w3wp process
PROBLEM DESCRIPTION =================== I can run ASP.NET applications on the server, however I have noticed that when I do there is an asp error entry in the event log: "Unable to get the private bytes memory limit for the W3WP process. The ASP.NET cache will be unable to limit its memory use, which may lead to a process restart. Error 0x80070005". ENVIRONMENT =========== – Windows Server 2003 – .NET Framework 1.1 SUMMARY of TROUBLESHOOTING ========================== This error is caused by a known issue with insufficient permissions in your IIS metabase. The metabase ACL’s on the target server did not include the IIS_WPG group on the following two nodes of the metabase (IIS_WPG is in both ACL’s on a clean install): – W3SVC/AppPools – W3SVC/Filters You can download the MetaACL utility from http://support.microsoft.com/?id=267904. After you have installed the program, open a command prompt and navigate to the directory where you installed it. Then type the following: – cscript metaacl.vbs IIS://Localhost/W3SVC/AppPools IIS_WPG RE – cscript metaacl.vbs IIS://Localhost/W3SVC/Filters IIS_WPG RE Warning: The path is case sensitive – type exactly as above; after you run this command restart the IIS services and see if this corrects the problem. Update: here is…
-
Automatic proxy configuration in .NET Framework 2.0
PROBLEM DESCRIPTION =================== The outcome of the execution of PAC file seems to change when called from IE or from a .Net 2.0 client. The internal URL we want to call is http://webapps.custname.com and the IP address of the web apps server is 141.122.180.192. For example, here is a sample PAC file function FindProxyForURL(url, host) { if (isInNet(host, "141.122.0.0", "255.255.0.0")) { return "DIRECT" } else { return "PROXY 169.12.232.25:8080" } } When called from IE, the internal url http://webapps.custname.com is directly connected to the web server without using a proxy. So the PAC file returns “DIRECT”. When called from a .Net 2.0 application, the same url (http://webapps.custname.com) is redirected to the internal proxy 169.12.232.25:8080. If he uses the IP address of the web Server ( http://141.122.180.192 ), the isInNet function seems to work as the request is not redirected to the proxy anymore. I used the code below to test the differences between .Net 1.1, .Net 2.0 and IE (taken from http://msdn.microsoft.com/msdnmag/issues/05/08/AutomaticProxyDetection/default.aspx ). using System; using System.Net; public class Test { public static void Main(string[] args) { IWebProxy iwp11 = GlobalProxySelection.Select; Console.WriteLine(iwp11.GetProxy(new Uri(args[0])).ToString()); //comment the following 2 lines when compiling on 1.1 IWebProxy iwp20 = WebRequest.DefaultWebProxy; Console.WriteLine(iwp20.GetProxy(new Uri(args[0])).ToString()); } …
-
Content Management Server and proxy detection
PROBLEM DESCRIPTION===================You are using Site Manager from MCMS 2002.Site Manager is partly build on C# and is using the HttpWebRequest class in .NET framework to connect to the MCMS server.In the customers environment SiteManager wrongly tries to connect through a proxy server rather than directly connecting to the MCMS server. SUMMARY of TROUBLESHOOTING==========================Using a configuration file to instruct your application to use the right parameters:. Set the GlobalProxySelection option in the application config file (NRClient.exe.config) and copy the file into “C:\Program Files\Microsoft Content Management Server\Client” (see below for file content) <configuration> <system.net> <defaultProxy> <proxy proxyaddress = “http://proxyaddress:port” bypassonlocal = “true” /> </defaultProxy> </system.net></configuration> CheersCarlo
-
Missing ASP.NET Tab in IIS Management Console
PROBLEM DESCRIPTION =================== On a Windows 2003 64bit machine with both .NET Framework 1.1 and 2.0 installed, you are tying to configure a website on IIS, but you are unable to find the tab to specify ASP.NET settings. SUMMARY of TROUBLESHOOTING ========================== Researched turned out this being a bug that is closed as "won’t fix". If you are gong to run IIS 32-bits on WOW64, MMC Support for ASP.Net snap-in is currently not allowed. We are in the process of writing a KB article to document this. In general the ASP.net tab is giving you the UI to configure the application to run different versions. You could use the specific version of aspnet_regiis.exe utility to configure this. The utility is aspnet_regiis -i under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727, if you want your application to run under 2.0. There are several command switches to configure specific sites or directory only. If you see these problems on 32-bit OS there’s a known workaround: Manually run the install for ASP.NET: ASPNET_regiis -i Register the dll for the MMC: regsvr32.exe "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mmcaspext.dll" "rundll32.exe" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\webengine.dll",RegisterAspNetMMC From a command prompt run: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm.exe C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\AspNetMmcExt.dll /tlb:AspNetMMCExt.tlb Change the About value in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{fedb2179-2335-48f1-aa28-5cda35a2 b36d}" from {7D23CCC6-A390-406F-AB67-2F8B7558F6F7} to {7D23CCC6-A390-406F-AB67-2F8B7558F6F6} UPDATE (5th November, 2006) Just…
-
Http compression and WinForm controls as legacy ActiveX
The following is the summary of a couple of cases I worked on a while ago, there are some details which I’ll need to investigate thoroughly… anyway those are the facts so far. PROBLEM DESCRIPTION===================I have a rich WinForms UserControl which is embedded into a web page. Since installing .NET 2.0 on the clients, the control stopped loading completely. – I disabled security completely using caspol -s off => no effect – I enabled fusion logging => no single entry generated – I enabled the IEHost log => nothing created – Changed to another client machine => same issues, same results – I started writing a new UserControl from scratch and deployed it to the same server. The control could also not be loaded. I deployed the same test project to another 2003 server in the same domain, with equal patch levels (SP1 and latest patches installed) and it worked. Perhaps a naming issue? – I tried to change the names => no result – I compared the HTTP requests to the different server => nothing special – The issues stated above are reproducible from any client, such it should be a server or framework issue. – I even have…
-
Watch your symbols!
This morning I had an open discussion with a customer regarding symbols and their importance in our job (our intended also as a developer, not just as a support specialist). This customer sent in a dump for a memory leak problem he has in his web site (ASP.NET with COM components, calls to Web Services etc…). I have to admit that a few times in the past I went through a dump without any symbols for the application (luckily I always have access to both internal and external symbol server for the OS, .NET Framework etc…), and even sometimes I’ve been able to find the cause of the problem anyway (sometimes it’s quite obvious, it you have memory fragmentation, debug=”true” in web.config, too many dynamic assemblies caused by XML/XSLT stuff etc…), but there are occasions where the call stack is completely messy and the real problem quite hard to discover. Also more important is to have matching symbols: debugging with non-matching symbols could be much worse than debugging without symbols at all, and the analysis could take a completely wrong direction, wasting time and efforts without helping sorting out the problem… and you’ll get a bad support experience when you’ll call us to ask…
-
Strange compilation error in machine.config
As my colleague Tess told a while ago, sometimes the problems seems to come in bunches; so it happened that I saw the following error message from two different customers in less than a week… Server Error in ‘/’ Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: This config section already contains an identical line, which is not allowed.Source Error: Line 350: extension=".js" Line 351: type="Microsoft.JScript.JScriptCodeProvider, Microsoft.JScript, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> Line 352: </compilers> Line 353: Line 354: <assemblies> Source File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 352 Unfortunately this error message is a bit misleading, and you get this problem if you run multiple installations of a Device Update for Outlook Mobile Access (OMA), without have first uninstalled previous versions of this update. To resolve the problem, open your machine.config file and check line #359 and #367 (please note that the line numbers may vary a bit, depending if you have installed other components which have changed your machine.config):– line 359: assembly=”System.Web.UI.MobileControls.Adapters,Version=1.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a” /> – line 367: assembly=”System.Web.UI.MobileControls.Adapters,Version=1.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a” /> Both lines should be the same. Next, remove the section that…
-
Back online
A month after my first post I’m back from my summer holidays and ready to come back to my desk and to my cases to work on… Slow start this week, though: on Thursday and Friday I’ll work from home (Home Working, great move and great conquest to improve our work-file balance!), then next week I’ll be fully in. By the way, just in case you fancy to see a few pictures I took during my vacation, here is a selection. I think that’s all for now, just a few more days to recoved from the post-vacation duties (gifts to distribute to parents and friends, baggages to unpack etc…), then I should be ready to start this new blogging experience 🙂 CheersCarlo
-
Hello world (reloaded)
Reloaded because I used to have an Italian blog a while ago (well… it’s still there to be honest), but then professional and personal life changes kept me away from blogging… anyway, that’s an old (and not interesting) story. I joined Microsoft a couple of years ago and since the beginning I work in the Internet Development support team in EMEA; my job is try to understand why a web application is not working as expected (or not working at all, quite often) and help customers to fix. Probably you already know a couple of my colleagues part of my team, Doug and Tess. In my day to day work I answer to “advisory” questions (How to I do this? Or Is there a better way to achieve that etc…), debugger problems, web controls which does not behave as expected, IIS and ASP.NET configuration issues etc… (I guess you get an idea). Often (and are the cases where I have more “fun”) I work on cases where a web application consumes too memory, or too CPU, or performs badly, or crashes (be aware or what is a real crash and what is perceived to be a crash… maybe I’ll discuss…