Search Results

Search found 2 results on 1 pages for 'chrisjlong'.

Page 1/1 | 1 

  • problem with NHibernate and iSeries DB2

    - by chrisjlong
    Ok So I have an AS400/iSeries running v5r4. I have an application that was using classic NHibernate to connect and do some basic crud. Now I have pulled that app (which sat for 2 years) off the shelf of TFS and onto a new PC and cannot seem to get it running. Here is my Hibernate Config: <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.provider"> NHibernate.Connection.DriverConnectionProvider </property> <property name="dialect"> NHibernate.Dialect.DB2400Dialect </property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property> <property name="connection.connection_string"> DataSource=207.206.106.19; Database=AS400; userID=XXXXXX; Password=XXXXXXX; LibraryList=FMSFILTST,BEFFILT,HRDBFT,HRCSTFT,J20##X2DEV,GLCUSTDEV,OSL@@F3DEV; Naming=System; Initial Catalog=*SYSBAS; </property> <property name="use_outer_join">true</property> <property name="query.substitutions"> true 1, false 0, yes 'Y', no 'N' </property> <property name="show_sql">false</property> <mapping assembly="BusinessLogic" /> </session-factory> </hibernate-configuration> I have all the proper DLL's included (NHibernate, castle, iesi, antlr3 , log4 etc). Also have this line in my web.config <runtime> <assemblyBinding> <qualifyAssembly partialName="IBM.Data.DB2.iSeries" fullName="IBM.Data.DB2.iSeries,Version=10.0.0.0,PublicKeyToken=9CDB2EBFB1F93A26,Culture=neutral"/> </assemblyBinding> </runtime> Yet I am still getting the following error as soon as I call NHibernate.Cfg.Configuration().Configure().BuildSessionFactory().OpenSession(); The error is as follows Unable to cast object of type 'IBM.Data.DB2.iSeries.iDB2Connection' to type 'System.Data.Common.DbCommand' I am dying to get some help with this. Any assistance is appreciated. Thanks!

    Read the article

  • Saving HttpResponse/Request to file system

    - by chrisjlong
    Here is my scenario. User fills out this large page which is dynamically created based off DB values. Those values can change. When the user fills out the page and hits submit we want to save a copy of the page as html on the server, this way if the text or wording changes, when they go back to view their posted information, it is historically accurate. So I basically need to do this protected void buttonSave_Click(object sender, EventArgs e) { //collect information into an object to save it in the db bool result = BusinessLogic.Save(myBusinessObject); if (result) //!!! Here is where I need to save this page as an html file on my servers IFS!!!! else //whatever Response.Redirect("~/SomeOtherPage.aspx"); } Any help is greatly apprciated. Also I CANNOT just request the data from the url because query string parameters are a big no no in this case. The key to pull the database info up (at its highest level) is all in session so I cant just request a url and save it. Thanks!

    Read the article

1