<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">zc0000</title><subtitle type="html" /><id>http://weblogs.asp.net/atlaszhu/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/atlaszhu/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2010-03-29T09:50:00Z</updated><entry><title>About  offsetParent ....</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2012/10/31/about-offsetparent.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2012/10/31/about-offsetparent.aspx</id><published>2012-10-31T17:30:00Z</published><updated>2012-10-31T17:30:00Z</updated><content type="html">Assume we have a "div" in  body:

if the div 's  position is   absolute  /  relative /  static ,   its  offsetParent  is    body;

if its position is   fixed ,  then its offsetParent is null !&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=9266642" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="javascript" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/javascript/default.aspx" /></entry><entry><title>IIS fastCgi applications settings on monitorChangesTo , phprc</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2012/09/16/iis-fastcgi-applications-settings-on-monitorchangesto-phprc.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2012/09/16/iis-fastcgi-applications-settings-on-monitorchangesto-phprc.aspx</id><published>2012-09-16T14:25:00Z</published><updated>2012-09-16T14:25:00Z</updated><content type="html">&lt;div style="font-size:14PX" &gt;

&lt;p&gt;PHPRC variable just denotes location of  php.ini ;   as in fastCgi/application section,  you can't rely on PHPRC to be the default folder of all path settings ; &lt;/p&gt;

&lt;p&gt;eg :   if  PHPRC = D:\phpCustom  ,  then    monitorChangesTo="php.ini"  won't monitor  "D:\phpCustom\php.ini"  , actually just assigning "php.ini" is like assigning a relative path; in such case there is a conclusion: &lt;/p&gt;



&lt;p&gt;
&lt;a href="http://ruslany.net/2010/03/php-on-iis-monitorchangesto-setting-in-fastcgi/" target="_blank"  &gt;If a relative file path is specified instead of an absolute path then FastCGI will assume that it is relative to the location of php-cgi.exe file.&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
So the best way is assigning absolute path as  monitorChangesTo="D:\phpCustom\php.ini"
&lt;/p&gt;

&lt;/DIV&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8929994" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author></entry><entry><title>Important php.ini settings under  IIS-fastCgi</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2012/09/15/important-php-ini-settings-under-iis-fastcgi.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2012/09/15/important-php-ini-settings-under-iis-fastcgi.aspx</id><published>2012-09-16T03:25:00Z</published><updated>2012-09-16T03:25:00Z</updated><content type="html">
&lt;ul style="font-size: 14px;"&gt;


&lt;li&gt;user_ini.filename = ".user.ini" &lt;/li&gt;


&lt;li&gt;user_ini.cache_ttl = 1 &lt;/li&gt;



&lt;li&gt;extension_dir = "ext"&lt;/li&gt;


&lt;li&gt;fastcgi.impersonate = 1&lt;/li&gt;


&lt;li&gt;date.timezone = Asia/Shanghai	&lt;/li&gt;


&lt;li&gt;zend_extension = ext\php_xdebug-2.2.0-5.4-vc9-nts.dll&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8928246" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="php fastcgi" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/php+fastcgi/default.aspx" /></entry><entry><title>NOTE: Use 64bit editor ( Notepad2 x64 ) to change  64bit asp.net application's  "applicationHost.config" !!</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2012/09/15/note-use-64bit-editor-notepad2-x64-to-change-64bit-asp-net-application-s-quot-applicationhost-config-quot.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2012/09/15/note-use-64bit-editor-notepad2-x64-to-change-64bit-asp-net-application-s-quot-applicationhost-config-quot.aspx</id><published>2012-09-15T18:13:00Z</published><updated>2012-09-15T18:13:00Z</updated><content type="html">1.  If  current windows OS is 64bit (  win7 x64  or  windows server 2008 )  ,   then 32bit editors (   notepad++ ,  visual studio )   can't actually change  C:\Windows\System32\inetsrv\Config\applicationHost.config  ;   changing this file is actually changing C:\Windows\SystemWOW64\inetsrv\Config\applicationHost.config, which is configured for 32bit asp.net applications on 64bit OS platform !

2. So, to serve 64bit asp.net application we need access real "C:\Windows\System32\inetsrv\Config\applicationHost.config" ,  then we need a 64bit editor.   "Notepad2 x64" is an ideal choice.

&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8926885" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author></entry><entry><title>Again: how to configure  XDebug</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2012/06/03/again-how-to-configure-xdebug.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2012/06/03/again-how-to-configure-xdebug.aspx</id><published>2012-06-03T06:00:00Z</published><updated>2012-06-03T06:00:00Z</updated><content type="html">
1.  download from xdebug.org  (  use the 32bit  ntf version ,  eg : php_xdebug-2.2.0-5.4-vc9-nts.dll )

2.  put  dll in "ext" folder

3.  add the extension config  to  php.ini  :    

     ;[zend_extension]
zend_extension = ext\php_xdebug-2.2.0-5.4-vc9-nts.dll

4.  NOTE:  to enable site debuggable ,  should  switch on the setting for target site (  could put in separate "user.ini"  files )

xdebug.remote_enable = On&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8559007" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="Eclipse PDT" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/Eclipse+PDT/default.aspx" /><category term="php" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/php/default.aspx" /><category term="XDebug" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/XDebug/default.aspx" /></entry><entry><title>Configure  Eclipse PDT /  XDebug  for  PHP debugging</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2012/04/08/configure-eclipse-pdt-xdebug-for-php-debugging.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2012/04/08/configure-eclipse-pdt-xdebug-for-php-debugging.aspx</id><published>2012-04-08T08:33:00Z</published><updated>2012-04-08T08:33:00Z</updated><content type="html">&lt;p style="font-weight: bold;"&gt;Eclipse PDT settings&lt;/p&gt;

&lt;p&gt;A suggestion: don't set "workspace" location the same as real project files reside.  Seperate "Eclipse projects files" with actual source files. &lt;/p&gt;


&lt;p&gt;Take PHP 5.4 custom installation as an example.   The executable should be properly configured in Preference tab. &lt;/p&gt;

&lt;img src="http://weblogs.asp.net/blogs/atlaszhu/snapshots/PHP.Executables.JPG"&gt;

&lt;img src="http://weblogs.asp.net/blogs/atlaszhu/snapshots/Edit.PHP.Executable.JPG"&gt;

&lt;p&gt;Then configure proper base site url, especially it is not "localhost".  As in this sample the launched site is "http://phplab/".&lt;/p&gt;

&lt;img src="http://weblogs.asp.net/blogs/atlaszhu/snapshots/Preference.PHPServers.JPG"&gt;

&lt;p&gt;Configure general debug settings ( assign XDebug as debugger ):&lt;/p&gt;

&lt;img src="http://weblogs.asp.net/blogs/atlaszhu/snapshots/PHP.Debug.JPG"&gt;

&lt;p&gt;As per web app project,  should set proper base url. If directly launching web app from "http://phplab/" , the base path should be set with "/". &lt;/p&gt;

&lt;img src="http://weblogs.asp.net/blogs/atlaszhu/snapshots/Project.Specific.PHP.Debug.jpg"&gt;


&lt;p&gt;Important XDebug settings under PHP engine&lt;p&gt;

&lt;p&gt;1.  Download proper XDebug dll, set it as Zend extension in root php.ini:&lt;/p&gt;

&lt;p style="font-weight: bold;"&gt;zend_extension = ext\php_xdebug-2.2.0RC1-5.4-vc9-nts.dll&lt;/p&gt;

&lt;p&gt;Note zend extension doesn't rely on "extension_dir" so here should explicitly assign the relative directory part "ext", otherwise PHP can't position the dll path.&lt;/p&gt;

&lt;p&gt;2.  Must  set  &lt;span style="font-weight: bold;"&gt; xdebug.remote_enable = On &lt;/span&gt; ( in root level or per site level ( user.ini ) ) !  Otherwise when starting "remote launch" ( this is essential for web server debugging ) , the PDT status always stays here and can't get further response: &lt;/p&gt;

&lt;img src="http://weblogs.asp.net/blogs/atlaszhu/snapshots/Launching57.JPG" mce_src="http://weblogs.asp.net/blogs/atlaszhu/snapshots/Launching57.JPG"&gt;


&lt;p&gt;Debugging needs switching to "Debug" perspective; otherwise stays in "PHP" perspective for maintaining project or handling sources.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8380241" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="Eclipse" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/Eclipse/default.aspx" /><category term="Eclipse PDT" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/Eclipse+PDT/default.aspx" /><category term="XDebug" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/XDebug/default.aspx" /></entry><entry><title>About DNN ajax</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2012/03/31/about-dnn-ajax.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2012/03/31/about-dnn-ajax.aspx</id><published>2012-03-31T10:24:00Z</published><updated>2012-03-31T10:24:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;DNN uses iframe to mock ajax effect. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;Eg: installation progress notification div. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;lt;form name="TheForm" method="post" target="" action="&lt;A href='http://localhost/DotNetNuke_Community/Install/InstallWizard.aspx?__U=1333186680507"&gt;&lt;input'&gt;http://localhost/DotNetNuke_Community/Install/InstallWizard.aspx?__U=1333186680507"&amp;gt;&amp;lt;input&lt;/A&gt; type="hidden" name="ctx" value="2"&amp;gt;&amp;lt;input type="hidden" name="__DNNCAPISCI" value="__Page"&amp;gt;&amp;lt;input type="hidden" name="__DNNCAPISCP" value="06.00.01"&amp;gt;&amp;lt;/form&amp;gt;"&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8371614" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author></entry><entry><title>set fastCgi with appcmd</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2012/03/28/about-an-fastcgi-appcmd.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2012/03/28/about-an-fastcgi-appcmd.aspx</id><published>2012-03-29T03:40:00Z</published><updated>2012-03-29T03:40:00Z</updated><content type="html">&lt;DIV style="OVERFLOW-X: scroll; FONT-SIZE: 14px"&gt;
&lt;P&gt;The official &lt;A href="http://weblogs.asp.net/controlpanel/blogs/" mce_href="http://weblogs.asp.net/controlpanel/blogs/"&gt;FastCgi&lt;/A&gt; section says: &lt;/P&gt;
&lt;P&gt;You can configure the &amp;lt;fastCgi&amp;gt; element at the server level in the ApplicationHost.config file or at the site level, at the application level, or at the directory level in a Web.config file. &lt;/P&gt;
&lt;P&gt;However this is not by default, since applicationHost.config has pre-defined: &lt;/P&gt;&lt;PRE&gt;        &amp;lt;sectionGroup name="system.webServer"&amp;gt;
           ...
            &amp;lt;section name="fastCgi" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /&amp;gt;
		   ...
		&amp;lt;/sectionGroup&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;Thereby if type this command: &lt;/P&gt;&lt;PRE&gt;appcmd set config mainsite /section:fastCgi /+"[fullPath='d:\php\php-cgi.exe',arguments='-d open_basedir="d:\mainsite"']"
&lt;/PRE&gt;
&lt;P&gt;It just throw such error: &lt;/P&gt;
&lt;P&gt;ERROR ( message:New application object missing required attributes. This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".. ) &lt;/P&gt;
&lt;P&gt;NOTE: the parameter should be quoted if contains any space!! That means , you can't even type as : &lt;/P&gt;&lt;PRE&gt;C:\Windows\System32\inetsrv&amp;gt;appcmd set config mainsite /section:fastCgi /+[fullPath='d:\php\php-cgi.exe', activityTimeout='500']
&lt;/PRE&gt;
&lt;P&gt;beause a space is padded in between "..-cgi.exe'," and "activityTimeout". Typing as this causes such error: &lt;/P&gt;
&lt;P&gt;Failed to process input: The parameter 'activityTimeout='500']' must begin with a / or - (HRESULT=80070057). &lt;/P&gt;
&lt;P&gt;Nonsense. &lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8368426" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="appcmd" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/appcmd/default.aspx" /><category term="applicationhost.config" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/applicationhost_2E00_config/default.aspx" /><category term="fastCgi" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/fastCgi/default.aspx" /></entry><entry><title>Active Directory Configuration Issues ...</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2011/05/09/active-directory-configuration-issues.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2011/05/09/active-directory-configuration-issues.aspx</id><published>2011-05-09T06:50:00Z</published><updated>2011-05-09T06:50:00Z</updated><content type="html">
&lt;div style="font-size: 14px;"&gt;

&lt;p&gt;1.  Configure a "Active Directory Domain Controller" on server A&lt;/p&gt;

&lt;p&gt;2.  Set Server B's domain to the domain configured in server A , say, "sample.com"&lt;/p&gt;

&lt;p&gt;In step 2 we may get some exceptions as :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller (AD DC) for domain "xxx.com":&lt;/p&gt;

&lt;p&gt;The error was: "DNS name does not exist."&lt;/p&gt;
&lt;p&gt;(error code 0x0000232B RCODE_NAME_ERROR)&lt;/p&gt;

&lt;p&gt;The query was for the SRV record for _ldap._tcp.dc._msdcs.xxxx.com&lt;/p&gt;

&lt;p&gt;Common causes of this error include the following:&lt;/p&gt;

&lt;p&gt;- The DNS SRV records required to locate a AD DC for the domain are not registered in DNS. These records are registered with a DNS server automatically when a AD DC is added to a domain. They are updated by the AD DC at set intervals. This computer is configured to use DNS servers with the following IP addresses:&lt;/p&gt;

&lt;p&gt;xx.xx.xx.xx&lt;/p&gt;

&lt;p&gt;- One or more of the following zones do not include delegation to its child zone:&lt;/p&gt;

&lt;p&gt;xxx.com&lt;/p&gt;
&lt;p&gt;com&lt;/p&gt;
&lt;p&gt;. (the root zone)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The following error occurred attempting to join the domain "bamv2":&lt;/p&gt;

&lt;p&gt;An attempt to resolve the DNS name of a domain controller in the domain being joined has failed.  Please verify this client is configured to reach a DNS server that can resolve DNS names in the target domain. For information about network troubleshooting, see Windows Help.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This is possibly caused by wrongly setting the DNS server IP on the client which is intented to join the target domain.  &lt;/p&gt;

&lt;p&gt;Open Network and Sharing Center -&amp;gt; Local Area Connection Properties Dialogbox -&amp;gt; IPV4 Properties dialog -&amp;gt;  Use the folowing DNS IP Address -&amp;gt; Set "Preferred DNS Server" to the target AD server ip address&lt;/p&gt;

&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7782130" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author></entry><entry><title>A client problem, not server's :  A network-related or instance-specific error occurred while establishing a connection to SQL Server...</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2011/04/30/a-client-problem-not-server-s-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2011/04/30/a-client-problem-not-server-s-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server.aspx</id><published>2011-04-30T17:59:00Z</published><updated>2011-04-30T17:59:00Z</updated><content type="html">&lt;div style="font-size: 14px;"&gt;
&lt;p&gt;I don't know, when and why,  I cannot connect remote SQL server from my win7 &amp;amp; winserver2008 (64bit) machines.  When trying to connect a server by typing IP  ( xx.xx.xx.xx ) in the server name in "Management studio-&amp;gt;Connect Server" dialog box, I always get: &lt;/p&gt;

&lt;p style="color: red;"&gt;
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
&lt;/p&gt;


&lt;p&gt;or ( If typing "xx.xx.xx.xx,yyyy" - assigning port ) &lt;/p&gt;

&lt;p style="color: red;"&gt;
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: TCP Provider, error: 0 - TCP Provider: ) (Microsoft SQL Server, Error: -1)
&lt;/p&gt;

&lt;p&gt;Well , after cautious checking I am sure it is not caused by wrong server configuration, since I even tested onnection from another XP3 32bit computer and it's OK, implying problem lies in my win7 client.  &lt;/p&gt;   

&lt;p&gt;
It's really very,very weird ------ no detailed information for the error even seeking event viewer. Eventually &amp;amp; luckily I approach to get around it : just connect local server by type IP format server name: "127.0.0.1" ------ it is like some internal mechanism that "IP" server is triggered ; once IP is triggered locally, it could be applied on remote connection. After connecting "127.0.0.1" I could get my remote server connected.
&lt;/p&gt;

&lt;p&gt;Does anyone know why thing goes as this ? &lt;/p&gt;

&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7773929" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="sql server 2008 r2" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/sql+server+2008+r2/default.aspx" /></entry><entry><title>How to circumvent "Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2011/02/26/how-to-circumvent-quot-cannot-obtain-value-of-local-or-argument-as-it-is-not-available-at-this-instruction-pointer-possibly-because-it-has-been-optimized-away.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2011/02/26/how-to-circumvent-quot-cannot-obtain-value-of-local-or-argument-as-it-is-not-available-at-this-instruction-pointer-possibly-because-it-has-been-optimized-away.aspx</id><published>2011-02-26T09:28:00Z</published><updated>2011-02-26T09:28:00Z</updated><content type="html">&lt;div style="font-size: 14px;"&gt;
&lt;p&gt;Sometimes when debugging code we can't "watch" variable's value and only get this alerting message:&lt;/p&gt;

&lt;p style="color: red;"&gt;
Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away
&lt;/p&gt;

&lt;p&gt;As this has been discussed in &lt;a href="http://blogs.msdn.com/b/sburke/archive/2008/01/29/how-to-disable-optimizations-when-debugging-reference-source.aspx" target="_blank" mce_href="http://blogs.msdn.com/b/sburke/archive/2008/01/29/how-to-disable-optimizations-when-debugging-reference-source.aspx"&gt;How to disable optimizations when debugging Reference Source&lt;/a&gt;.   According to his second suggesion, I just leave a checkbox blank:&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/blogs/atlaszhu/DebugUncheckEnableVShost.PNG" mce_src="http://weblogs.asp.net/blogs/atlaszhu/DebugUncheckEnableVShost.PNG"&gt;

&lt;p&gt;Then rebuild the project.  Then in your main project which references the "originally optimized" project , you could see the variables are accessible now. &lt;/p&gt;
&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7712937" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author></entry><entry><title>Base class' constructor takes effect even not explicitly called. </title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2010/04/07/base-class-constructor-takes-effect-even-not-explicitly-called.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2010/04/07/base-class-constructor-takes-effect-even-not-explicitly-called.aspx</id><published>2010-04-07T06:28:00Z</published><updated>2010-04-07T06:28:00Z</updated><content type="html">&lt;div style="font-size:14px" &gt;
&lt;p&gt;I almost have no impression at all on a heavily important c# grammar issue...... &lt;/p&gt;

&lt;p&gt;Originally I thought base class' constructor doesn't participate in any of derived class' constructional logic unless explicitly called for serving , just like :&lt;/p&gt;
&lt;pre&gt; 
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; Manager(&lt;span style="color:Blue;"&gt;int&lt;/span&gt; initialdata) : &lt;span style="color:Blue;"&gt;base&lt;/span&gt;()
{
    &lt;span style="color:Green;"&gt;//Add further instructions here.&lt;/span&gt; 
}
 
&lt;/pre&gt;

In this manner the default constructor is to be called undoubtedly. 

However in my bad conception I think code like this:

&lt;pre&gt; 
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; Manager(&lt;span style="color:Blue;"&gt;int&lt;/span&gt; initialdata)
{
    &lt;span style="color:Green;"&gt;//Add further instructions here.&lt;/span&gt; 
}
 
&lt;/pre&gt;

doesn't call the base class' default constructor because there is no explicit code  ":base()"  coming after main class name "Manager" so the base default constructor has no impact here.

&lt;p&gt;However I am wrong.    The two pieces above are semantically identical.   Official tutorial tells me: &lt;/p&gt;

&lt;b&gt;In a derived class, if a base-class constructor is not called explicitly using the base keyword, then the default constructor, if there is one, is called implicitly.&lt;/b&gt;

&lt;p&gt;Here is official link stating this case:&lt;/p&gt;

&lt;a href='http://msdn.microsoft.com/en-us/library/ms173115(VS.80).aspx' target="_blank" &gt;Using Constructors (C# Programming Guide)&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7433662" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="c# constructor base inheritance" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/c_2300_+constructor+base+inheritance/default.aspx" /></entry><entry><title>asp.net Auto-generated SQLEXPRESS database: Failed to generate a user instance of SQL Server ( troubleshooting 1 )</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2010/04/04/asp-net-auto-generated-sqlexpress-database-failed-to-generate-a-user-instance-of-sql-server-troubleshooting-1.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2010/04/04/asp-net-auto-generated-sqlexpress-database-failed-to-generate-a-user-instance-of-sql-server-troubleshooting-1.aspx</id><published>2010-04-04T20:03:00Z</published><updated>2010-04-04T20:03:00Z</updated><content type="html">If you adopt .net Login controls to handle user authentication tasks and simply rely on default connection settings which generates SQLEXPRESS-based database in APP_Data folder , especially under the windows 7 or windows server 2008 system, you are likely to suffer several exceptions caused by similar reasons.   One is like:

&lt;hr/&gt;
  &lt;style&gt;
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
        &lt;/style&gt;
&lt;div style="text-align:justify" &gt;
 &lt;span&gt;&lt;H1&gt;Server Error in '/SamplesApp' Application.&lt;hr width=100% size=1 color=silver&gt;&lt;/H1&gt;

            &lt;h2&gt; &lt;i&gt;Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.&lt;/i&gt; &lt;/h2&gt;&lt;/span&gt;


&lt;/div&gt;
&lt;hr/&gt;

&lt;p&gt;To thoroughly  I log some repro steps. &lt;/p&gt;
&lt;p&gt;I create a new application pool "SamplesAppPool" to host "SamplesApp". &lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/EditAppSamplesApp.PNG' &gt;
&lt;p&gt;The "SamplesAppPool" 's identity is assigned using the win7/winserver 2008 r2-recommended feature: "ApplicationPoolIdentity" ,  leaving "Load User Profile" as false currenctly.&lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/AdvSetSamplesAPI.PNG' &gt;
&lt;p&gt;Such setting is meant to create a special account with the same name as target pool to run W3WP.exe.   For better security issue we no longer resort to Network Service.  This is an improved model induced into new generation of windows OS. &lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/TaskManager.PNG'  &gt;

&lt;p&gt;However if we use default asp.net connection string settings to initialize a build-in asp.net security database ( assuming SQLEXPRESS instance installed ) , which means the conn string is like :&lt;/p&gt;

&lt;p style='font-weight:bold;color:red' &gt;data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true&lt;/p&gt;

&lt;p&gt;'"User Instance=true" means that SQLEXPRESS service needs a User Profile envrionment to perform some initialization works. Since the aspnet worker process is run in "SamplesAppPool" account, there should be a special user profile folder caring this account.  However , since we previously set "Not load user profile",  system doesn't at all create such a profile ,  thus no corresponding user profile folder created: &lt;/p&gt;

&lt;p&gt;From &lt;b&gt;Control Panel\System and Security\System\Advanced system settings&lt;/b&gt; panel we can get user profiles information &lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/SysPropAdv.PNG' &gt;

&lt;p&gt;As you can see ,  the required "SamplesAppPool" profile is not maintained here.&lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/UProfNoCustomProf.PNG' &gt;

&lt;p&gt;Accordingly , "SamplesAppPool" profile folder does not exist in Users folder:&lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/UsersFolder.PNG' &gt;

&lt;br&gt;&lt;br&gt;

&lt;p&gt;To get around the exception ,  "Load User Profile" needs setting as "true" &lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/LdUProfT.PNG' &gt;

&lt;p&gt;Once above settings changed ,  such profile is created in system immediately:&lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/UProfSamApp.PNG' &gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/UsersHasSamApp.PNG'  &gt;

&lt;p&gt;So far ,  the SQLEXPRESS-related information has not been established in the profile folder yet.   We need trigger something to make account-specified sqlexpress folder constructed automatically.  That is : do what I mentioned at the top. If you simply click "create user" button in a CreateUserWizard control without any custom connection settings in web.config , you may find App_Data/aspnetdb.mdf is successfully created.  In addition ,  exploring "SamplesAppPool" profile folder will supply such a view:&lt;/p&gt;
&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/SQLEXPRESSFolder.PNG' &gt;

&lt;p&gt;To change application pool identity to build-in account such as "Network Service" without taking care of "Local User Profile"settings can solve the issue as well , because these build-in account auto-position to current logon user profile folder as is ensured by default and erect SQLExpress folder ( eg.  if I logon as "zc0000"  the folder is located at :  C:\Users\zc0000\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS  ).  Nevertheless, this is no longer suggestive in new generation of windows OS ( window 7 , windows server 2008 r2 or latter ) .  I think since Network Service has undertaken more and more tasks in the whole system,  Microsoft designs such a new mechanism to help the powerful giant out of heavy load thus to have asp.net applications be more concentrative and secure.&lt;/p&gt;

&lt;p&gt;Official knowledge base link concerning this issue:&lt;/p&gt;
&lt;a href='http://support.microsoft.com/kb/2002980' target="_blank"  &gt;Problems with SQL Server Express user instancing and ASP.net Web Application Projects&lt;/a&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7430808" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author></entry><entry><title>SQL SERVER 2008 Database Diagram:  "Saving changes is not permitted"</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2010/04/04/sql-server-2008-database-diagram-quot-saving-changes-is-not-permitted-quot.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2010/04/04/sql-server-2008-database-diagram-quot-saving-changes-is-not-permitted-quot.aspx</id><published>2010-04-04T18:59:00Z</published><updated>2010-04-04T18:59:00Z</updated><content type="html">&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/SaveChangeNotPermitDiagram.PNG'  &gt;

&lt;p&gt;When making some datatable changes in db diagram environment,  a popup window might show up with this message:&lt;/p&gt;

&lt;p style="color:red" &gt;Saving changes is not permitted. The changes that you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created./p&gt;

&lt;p&gt;meanwhile saving progress stops.&lt;/p&gt;

&lt;p&gt;It is because that SSMS by default prevents some operations that requires target tables to be recreated. To go over this block, the highlighted item in Options window needs unchecking.   &lt;/p&gt;

&lt;img src='http://weblogs.asp.net/blogs/atlaszhu/snapshots/TableDBDesignersOptionPreventSaving.PNG'  &gt;

&lt;p&gt;For more details refer the official knowledge base link:&lt;/p&gt;

&lt;p&gt;&lt;a href='http://support.microsoft.com/kb/956176' target="_blank"  &gt;Error message when you try to save a table in SQL Server 2008: "Saving changes is not permitted"&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7430187" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="Database diagram" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/Database+diagram/default.aspx" /><category term="Sql SERVER management studio" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/Sql+SERVER+management+studio/default.aspx" /><category term="Sql Sever 2008" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/Sql+Sever+2008/default.aspx" /></entry><entry><title>Database operations through SQL:  Database Restore ...</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/atlaszhu/archive/2010/03/29/database-operations-through-sql-database-restore.aspx" /><id>http://weblogs.asp.net/atlaszhu/archive/2010/03/29/database-operations-through-sql-database-restore.aspx</id><published>2010-03-29T13:50:00Z</published><updated>2010-03-29T13:50:00Z</updated><content type="html">
If using sql to perform a database restoring , care the sql-codes very well.   Any trivial mistake may prevent a successful execution.  Cases are listed here based on simple experiments.

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;with operation:  MOVE 'logical_file_name_in_backup' TO 'operating_system_file_name'  &lt;/p&gt;
&lt;p&gt;If logical file name not correctly set ,  following error is obtained:&lt;/p&gt;
&lt;p style='color:red' &gt;Logical file 'FILE_NAME' is not part of database 'DATABASE_NAME'. Use RESTORE FILELISTONLY to list the logical file names.&lt;/p&gt;

&lt;p style='color:red' &gt;RESTORE DATABASE is terminating abnormally. &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;  

&lt;/li&gt;
&lt;/ul&gt;

To be continue...&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7420449" width="1" height="1"&gt;</content><author><name>zc0000</name><uri>http://weblogs.asp.net/members/zc0000.aspx</uri></author><category term="database restore" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/database+restore/default.aspx" /><category term="sql server" scheme="http://weblogs.asp.net/atlaszhu/archive/tags/sql+server/default.aspx" /></entry></feed>