Baran Posted May 21, 2011 Posted May 21, 2011 Hi every one. I've installed SQL server 2008 and ran an ASP.net Application (I have wrote the application) on IIS 6. For debugging the program also I have installed Visual studio 2010. While running the application on visual studio I have no problem to access my database on my SQL server but on the IIS my website can not access the data base. I have checked my Connection string and every thing which link my site to the data base server. Nothing is wrong with them. I checked my problem in another forum because I thought my problem is with my windows 2008 server but it was not so This is a link to my topics: Windows server 2008 forum The error I get in google chrome is Object Moved Here which here is linked yo my first page and in IE, Internet Explorer cannot display the webpage Here is my codes where I used for my log in page and make an URL to redirecting to users control Panel. I don't know where is my problem.: string NationalCode [/color][/font][color=#6F8497][font=tahoma]ADO AD = new ADO()[/font][/color] [font="tahoma"][color="#6F8497"] bool checkRow= true String url ="" stringconnection = "data source=LEGEND\\LEGEND initial catalog=Pazhooheshintegrated security=SSPI" SqlConnectionCon = new SqlConnection(connection) SqlCommand Com= new SqlCommand("", Con) SqlDataReaderDR Com.CommandText= "select[LogIn].LNationalCode,Person.ID,Person.ImgDirectory,[LogIn].LogintType,[LogIn].OKfrom [LogIn],Person where Person.NationalCode=[LogIn].LNationalCode " + "and[LogIn].UserName='" + this.TextBox1.Text.ToString() + "' and Password='" +this.TextBox2.Text.ToString() + "'and LogIn.LogintType='" + this.DropDownList1.SelectedItem.Text +"'" try { Con.Open() DR =Com.ExecuteReader() DR.Read() if (!DR.HasRows) checkRow = false else { stringimage_link = DR["ImgDirectory"].ToString() StringID_hold = DR["ID"].ToString() switch(DR["LogintType"].ToString()) { case "?????": if (DR["OK"].ToString() != "True") { url = "NotAllowed.aspx" break } url = "ControlPanel/Prof.aspx?" NationalCode =AD.encrypt_Nationalcode(DR["LNationalCode"].ToString()) url += "NC=" + NationalCode + "&Img=" +AD.encrypt_Img(image_link) + "&LE=" +AD.encrypt_Nationalcode(ID_hold) break case "???? ????": url = "SiteManager/SMHomePage.aspx?" NationalCode = AD.encrypt_Nationalcode(DR["LNationalCode"].ToString()) url += "NC=" + NationalCode + "&Img=" +AD.encrypt_Img(image_link) + "&LE=" +AD.encrypt_Nationalcode(ID_hold)+"&SW=0" break default: break } } } catch(Exception t) { } finally { Con.Close() } if (!checkRow) { Response.Redirect("NotFound.aspx") } else { Response.Redirect(url) } Waiting for your helps... [/code][/color] Quote
FPCH Admin AWS Posted May 22, 2011 FPCH Admin Posted May 22, 2011 Make sure you set the app to run in 32bit mode. There are a few threads on here that outline what the problem is. Quote Off Topic Forum - Unlike the Rest
Baran Posted May 22, 2011 Author Posted May 22, 2011 Well I didn't catch your meaning by "Make sure you set the app to run in 32bit mode" :D I don't know how to do that. the only think I know is I have tested this app on both windows server 2008 32bit and windows seven 32bit with IIS 6 on both, and also the visual studio I used to design the pages is the 32bit one. I really don't know how to set that up? Quote
Recommended Posts