(VS 2008 .net 3.5) I'm really confused right now. Someone else created a website that I've been working on. We open the project solution when we work on it because we're using SourceGear Vault so everyone can work on it at the same time. We have different classes we're using and there's a global.asax. When I work on this program, it points to a local location on my computer, yet it's still connected through the network to know who has what checked out and what i can or cannot work on. When I run the program locally, everything works perfectly fine. When I put the application on the web server so I can view the program on our intranet site, I keep getting the connection string has not been initialized error. What's the difference between running it on my machine locally and running it on the web server?
Here's the global file that gets the connection
This is the code that's runningCode:Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application startup Dim JMconnString As String = ConfigurationManager.ConnectionStrings("JMConnectionString").ConnectionString Dim M2MconnString As String = ConfigurationManager.ConnectionStrings("M2MConnectionString").ConnectionString DBObj = New DBTools(JMconnString, M2MconnString, "c:") Application("DBTools") = DBObj Dim configfile As String = ConfigurationManager.AppSettings("OptionFileLoc") configfile = Server.MapPath("ConFig/") configfile = configfile & "ProgramInfo.xml" ConfigurationManager.AppSettings("OptionFileLoc") = configfile End Sub
Let me know if any code or other information is needed.Code:Dim dt As DataTable = QuikShipProduct.GetQSProductTypes this calls the class that runs this: Public Shared Function GetQSProductTypes() Return DBTools.CreateDT("select * from tblQSProductTypes order by ProdTypeID", DBLayer.DBTools.DB.DW) End Function




Reply With Quote