User Profile & Activity

Ahmed Dajani Member
Page
of 6
Posted: May 31, 2012 2:59 PM

Thank you Bernard. 

 

I ended up clearing and loading the dropdowns in the PrepareDataBinding event and it has been consistant.  I am still using InitializeLayout event though to create and add the columns to the grid.

 

Regards

Posted: May 30, 2012 11:57 AM

Thank you for your reply Bernard.  I actually don't use the PrepareDataBinding event.  And I never check for IsPostBack or IsFlyPostBack.

I have a DataSource that I bind the grid to.  In the InitializeLayout event, I call a function to clear any values in the WebValueLists.  Then I call another function to load, create, and add the columns to the Grid.  Seperately, I call another function that fills the WebValueList with a DataSource.

 

CType(WebGrid.RootTable.Columns.GetNamedItem(columnName).ValueList, ISNet.WebUI.WebGrid.WebValueList).ClearCachedDataSource()

Dim gridCol As New ISNet.WebUI.WebGrid.WebGridColumn
gridCol.DataMember = columnName
gridCol.Caption = columnCaption
gridCol.Name = columnName
gridCol.ColumnType = ISNet.WebUI.WebGrid.ColumnType.Text
gridCol.EditType = ISNet.WebUI.WebGrid.EditType.DropdownList
gridCol.DataType = "System.String"

Dim valueList As ISNet.WebUI.WebGrid.WebValueList = WebGrid.RootTable.Columns.GetNamedItem(gridCol.Name).ValueList
valueList.SetDataSource(myDataSource, myTextField, myValueField)
Posted: March 22, 2012 12:54 PM
That did it! Thank you very much :)

I've solved this problem.

I had to add the following to my web.config

<httpHandlers>            <!-- Intersoft Control Resources-->            <add path="ISRes.axd" verb="GET" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" validate="true"/>
        </httpHandlers>

So my final result in the web.config looks like this (to deploy too IIS 7)

<system.web>
        <customErrors defaultRedirect="/Errors/Oops.aspx" mode="On">
        </customErrors>
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            </assemblies>
        </compilation>
        <authorization>
            <deny users="?" />
        </authorization>
        <authentication mode="Forms">
            <forms loginUrl="~/Login" timeout="2880" name=".ASPXAUTH" protection="All"/>
        </authentication>
        <membership>
            <providers>
                <clear/>
                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
            </providers>
        </membership>
        <profile>
            <providers>
                <clear/>
                <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
            </providers>
        </profile>
        <roleManager enabled="false">
            <providers>
                <clear/>
                <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
                <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
            </providers>
        </roleManager>
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
        <httpHandlers>
            <!-- Intersoft Control Resources-->
            <add path="ISRes.axd" verb="GET" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" validate="true"/>
        </httpHandlers>
        
    </system.web>
    <system.webServer>
        <modules/>
        <validation validateIntegratedModeConfiguration="false"/>
        <handlers>
            <add name="ISRes.axd_GET" path="ISRes.axd" verb="GET" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" preCondition="integratedMode"/>
        </handlers>
    </system.webServer>



The problem is resolved (Phew)

Yudi and I walked through the deployment issue and it boiled down to Web.Config settings


The problem is resolved (Phew)

Yudi and I walked through the deployment issue and it boiled down to Web.Config settings

<?xml version="1.0"?><!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
    <configSections>
    </configSections>
    <appSettings file="">
        
        <clear />
        <add key="ISNet.WebUI.ISRes_Registered" value="true" />
        <add key="ISNet.WebUI.WebGrid.v7_0_7200.RunTimeLicenseKey" value="xxxxx-xxxx-xxxxx" />
        <add key="ISNet.WebUI.WebGrid.v7_0_7200.SharedScriptDirectory"
         value="~/CommonLibrary/Shared/" />
        <add key="ISNet.WebUI.WebGrid.v7_0_7200.ScriptDirectory" value="~/CommonLibrary/WebGrid/V7_0_7200/" />
        <add key="ISNet.WebUI.WebGrid.v7_0_7200.ImagesDirectory" value="~/CommonLibrary/Images/" />
        <add key="AppName" value="AARS" />
    
    </appSettings>
    <system.web>
        <customErrors defaultRedirect="/Errors/Oops.aspx" mode="On">
        </customErrors>
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
            <assemblies>
<!-- make sure there are no ISnet References in here -->
            </assemblies>
        </compilation>
        <authorization>
            <deny users="?" />
        </authorization>
        <authentication mode="Forms">
            <forms loginUrl="~/Login" timeout="2880" name=".ASPXAUTH" protection="All"/>
        </authentication>
        <membership>
            <providers>
                <clear/>
                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
            </providers>
        </membership>
        <profile>
            <providers>
                <clear/>
                <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
            </providers>
        </profile>
        <roleManager enabled="false">
            <providers>
                <clear/>
                <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
                <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
            </providers>
        </roleManager>
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
    </system.web>
    <system.webServer>
        <modules/>
        <validation validateIntegratedModeConfiguration="false"/>
        <handlers>
<!-- this is key -->
<add name="ISRes.axd_GET" path="ISRes.axd" verb="GET" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" preCondition="integratedMode"/> </handlers> </system.webServer> </configuration>


plus IIS 7 deployment issue.

Problem was VS 2010 was adding ISNet and ISNet.WebUI was being added to my project through GAC. When you add the references to your project, click the reference, check the properties and make sure the CopyLocal is set to True.

Your webconfig should look like:




<?xml version="1.0"?><!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
    <configSections>
    </configSections>
    <appSettings file="">
        
        <clear />
        <add key="ISNet.WebUI.ISRes_Registered" value="true" />
        <add key="ISNet.WebUI.WebGrid.v7_0_7200.RunTimeLicenseKey" value="xxxxx-xxxx-xxxxx" />
        <add key="ISNet.WebUI.WebGrid.v7_0_7200.SharedScriptDirectory"
         value="~/CommonLibrary/Shared/" />
        <add key="ISNet.WebUI.WebGrid.v7_0_7200.ScriptDirectory" value="~/CommonLibrary/WebGrid/V7_0_7200/" />
        <add key="ISNet.WebUI.WebGrid.v7_0_7200.ImagesDirectory" value="~/CommonLibrary/Images/" />
        <add key="AppName" value="AARS" />
    
    </appSettings>
    <system.web>
        <customErrors defaultRedirect="/Errors/Oops.aspx" mode="On">
        </customErrors>
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
            <assemblies>
<!-- make sure there are no ISnet References in here -->
            </assemblies>
        </compilation>
        <authorization>
            <deny users="?" />
        </authorization>
        <authentication mode="Forms">
            <forms loginUrl="~/Login" timeout="2880" name=".ASPXAUTH" protection="All"/>
        </authentication>
        <membership>
            <providers>
                <clear/>
                <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
            </providers>
        </membership>
        <profile>
            <providers>
                <clear/>
                <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
            </providers>
        </profile>
        <roleManager enabled="false">
            <providers>
                <clear/>
                <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
                <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
            </providers>
        </roleManager>
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
    </system.web>
    <system.webServer>
        <modules/>
        <validation validateIntegratedModeConfiguration="false"/>
        <handlers>
<!-- this is key -->
<add name="ISRes.axd_GET" path="ISRes.axd" verb="GET" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" preCondition="integratedMode"/> </handlers> </system.webServer> </configuration>



I just rolled back all my projects to .NET 2.0 and tried to deploy that way and it still failed.

Please let me know what I'm missing to do for this project to deploy with webgrid installed.

Hi Yudi,

Turns out this may be a WebGrid Specific error. Here's how I've come to this conclusion:

I took out all references to the webgrid project and deployed with a regular .NET grid to my prod server and I got the site to display.  Then I re-added all webgrid references back to the project, but still kept the regular .net grid. Deployed and I got the OutOfMemoryException error.

Is there something I need to add to my web.config ? IIS?

my webconfig is attached:

<?xml version="1.0"?><!--  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <appSettings>
    <clear/>
    <add key="ISNet.WebUI.ISRes_Registered" value="true"/>
    <add key="ISNet.WebUI.WebGrid.v7_0_7200.RunTimeLicenseKey" value="XXX"/>
    <add key="ISNet.WebUI.WebGrid.v7_0_7200.SharedScriptDirectory" value="~/CommonLibrary/Shared/"/>
    <add key="ISNet.WebUI.WebGrid.v7_0_7200.ScriptDirectory" value="~/CommonLibrary/WebGrid/V7_0_7200/"/>
    <add key="ISNet.WebUI.WebGrid.v7_0_7200.ImagesDirectory" value="~/CommonLibrary/Images/"/>
  </appSettings>
  <connectionStrings>
    <!--<add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />-->
  </connectionStrings>
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
      <assemblies>
        <add assembly="ISNet.ActiveReports.Exporting, Version=5.0.7200.1, Culture=neutral, PublicKeyToken=B1F2A8511635667A"/>
        <add assembly="ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=B1F2A8511635667A"/>
        <add assembly="ISNet, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=B1F2A8511635667A"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
      </assemblies>
    </compilation>
    <!--<authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>-->
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
      </providers>
    </membership>
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
      </providers>
    </profile>
    <roleManager enabled="false">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
      </providers>
    </roleManager>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>



Is there any issue for WebGird to run in .NET 4.0?

Hi Yudi,

I've actually tried that too and it also does not work. I was hoping you can offer some insight. I am wondering if there's some setting I'm missing or if my implementation is just bad.

I should mention I'm using WebGrid 7.0.7200.431. I'm running the application under a .NET 4.0 Classic Application Pool.

Posted: July 7, 2011 12:43 PM

No such luck.

Posted: July 6, 2011 4:02 PM

I was using the 430 before you send me the 431.  Which I replaced following your instructions and still have the issue.  I replied to your email directly.

Can you tell me which windows you have? .NET framework, VS05/08/10? Browser settings?

All times are GMT -5. The time now is 6:01 AM.
Previous Next