Jump to content

Baran

Members
  • Last visited

  • Posts

    12
  • Reputation

    0
  1. Hi every body. regarding problem I had (the SQL server one - I had two problems if you remember), I should say that I could fix it The solution was: 1) My log in SQL account (sa) was disable which should be enabled. To enable that I did the following: Under my server name in SQL server management studio->security -> logins-> sa-> double click on it -> click on Status from the right pan -> check the enable radio button 2) SQL login mode must be a mixed form of windows authentication and SQL server authentication. To change that I did the following: in SQL server management studio right click the server at the root of tree menu in left pan -> select properties -> security tab from left pan -> exchange server authentication from "Windows authentication mode" to "SQL server and windows authentication mode" 3) In the connection string I added the "sa" as Username and it's password as my login account to sql server you can do the same for another account which you want to be confirmed instead of "sa" !! here is my e-mail address for more help if you have the same problem and I could help you m.ahmadi@baranict.com
  2. 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?
  3. 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]
  4. Well Thank you very much You helped me a lot. I learned so many things here I'll check my problem in programming forum )
  5. I try " Response.BufferOutput = true " but result was the same!! :(( This is the Code I use in my page: string NationalCode ADO AD = new ADO() bool checkRow = true String url = "" string connection = "data source=LEGEND\\LEGEND initial catalog=Pazhoohesh integrated security=SSPI" SqlConnection Con = new SqlConnection(connection) SqlCommand Com = new SqlCommand("", Con) SqlDataReader DR Com.CommandText = "select [LogIn].LNationalCode,Person.ID,Person.ImgDirectory,[LogIn].LogintType,[LogIn].OK from [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 { string image_link = DR["ImgDirectory"].ToString() String ID_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) } Is there any thing wrong with my codes?!!
  6. Well, this app is on framework 3.5 and this framework is installed on my server but I don't know is it necessary to install framework 4 or not but I'll install it. Regarding my error i should say, yes, you are right :D It is OBJECT MOVED HERE which "HERE" is linked to my first page "Default.aspx". I still have problem and I couldn't find any solution. Waiting for you answer...
  7. Well I don't know you may be right The error I get is very simple: Object removed here!! which "here" is linked into the first page of my app. (Default.aspx) !!
  8. !! well you mean the problem is with my connection strings? If it is, so why I have no problem in visual studio? Let's assume that, that is the problem, how should I change my strings into the correct form? Let me say something honestly, I didn't catch your meaning by: " The problem is the blank authentication."
  9. Thank you for your answer. Regarding MDaemon problem, you were right. I should add above EXEs file to my firewall allowed program list. It's working well. but regarding SQL I do the same but nothing changed!! The problem still exist !! I don't know where is the problem!! I opened the ports 1433, I allowed almost all of sql EXEs files to be run throw my firewall I added rules just by the way that was said in Microsoft's official web site. My string Connections are right. My app. is working in Visual studio 2010 very good but in IIS it is not. I'm so confused!! Is there an other way ? Waiting for your answers...
  10. Thanks for the given topic I follow the solutions. I added two rule in my firewall. One for opening port 1433 and another for opening access to SQL Server when using dynamic ports. But unfortunately problems are not gone. My app can not access the data base. this is the string which I used in my app to retrieve data : Data Source=WIN-WKMIE6IIDYJ\SQLEXPRESSInitial Catalog=PazhooheshIntegrated Security=True My database does not have any username and password !! And my second problem is still there. when I turn my firewall off MDaemon can be accessible on port 3000 (my IP:3000) from another machine but when I turn it on, same problem. I added four rules for both peograms (sql server and MDaemon) !! Two in Inbound rules (port and program ) and two in Outbound rules but my problems are not gone. before any thing, thank a lot for your helps!!
  11. Thank you very very much for your answer It worked!! but still I have problem with my sql server. My web site can not access my data base. And also I have another question: What if I turn my fire wall ON? How should I configure my firewall not to have problem with my MDaemon mail server and SQL server?
  12. hi every one. I have two major problem with my windows server 2008 that I couldn't find any solution for them. MY first problem is: 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 thing the problem is with the firewall but I can't fix it !! and my second problem is: I've install MDaemon Mail server v9.5.2 on my windows server. while i'm accessing MDaemon World client on 192.168.0.35:3000 from my machine every thing is OK but in my local network (ofcourse it's obvious with no internet connectivity) i can't access the IP from another machine. also I think the problem is with my firewall but again I can't solve it. I need you help a lot. waiting for your solutions....