Tuesday, April 23, 2013

How to host a Nest ASP.Net applicaiton within the same source code.

I encounter an issue when i try to use the same source code to create a sub web application under

the current web application. the following picture will show the scenario that i want to acomplish






then i will receive the follow 500 Error




after i google  the web and do some research the following will solve the issue

this link will provide me great help in solving my problem

http://stackoverflow.com/questions/782252/avoid-web-config-inheritance-in-child-web-application-using-inheritinchildapplic

I must stop the nested child application inherit System.Web and System.WebServer configuration from the parent which is the source.

<location path="." inheritInChildApplications="false">
  <system.web>
   <compilation debug="true" targetFramework="4.5"/>
   <httpRuntime targetFramework="4.5"/>
   <pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID">
    <controls>
     <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
    </controls>
   </pages>
   <httpHandlers>
    <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/>
   </httpHandlers>
   <httpModules>
    <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
   </httpModules>
   <!--<httpRuntime maxRequestLength="92160000" executionTimeout="112"/>-->
   <identity impersonate="false"/>
  </system.web>
 
  <system.webServer>
   <validation validateIntegratedModeConfiguration="false"/>
   <modules runAllManagedModulesForAllRequests="true">
    <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
   </modules>
   <handlers>
    <remove name="Telerik.Web.UI.WebResource.axd" />
    <add name="Telerik.Web.UI.WebResource.axd" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode"/>
    <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/>
    <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/>
    <remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
    <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0"/>
    <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0"/>
    <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
   </handlers>
   <security>
    <requestFiltering>
     <requestLimits maxAllowedContentLength="943718"/>
    </requestFiltering>
   </security>
   </system.webServer>
 </location>
















Wednesday, March 20, 2013

How to solve Case Insensitive Issue in DB2 Query

we all know that SQL Server are case insensitive. when we implement the stored procedure, we did not worry about the filter criteria in the where clause.

I encounter an very strange error that use must use the correct format criteria when they run the application to search the database. the root cause of this issue is DB2 is case insensitive by default.

here is a work around to solve this issue. we can convert the filter column value to either upper case or lower case.


Select column1, column2 from DB2 Table
Where Upper(column1)=Upper(criteria one) and Lower(column2)=Lower(Criteria)

after I use the upper and lower function to convert the column values and filtered value in the stored procedure. now My Search application will ignore the case sensitive in the search input.