我面临着一个奇怪的问题
我在win server 2008上使用visual studio 2010,SQL Express 2008
在运行安全向导(创建单个用户,设置权限,如拒绝匿名并允许创建的用户)并按F5 - >该网站工作正常.
当我将文件夹移动到IIS 7并"转换为应用程序"时,会出现登录页面,但它不会接受我提供的密码.
有人告诉我,只有Stackoverflow天才会回答这个问题.
我正在使用.Net 4,manged pipleine模式 - > inegrated
IIS设置:
匿名认证 - >启用
表格认证. - >启用
ASP.Net模拟,基本身份验证,摘要身份验证,Windows身份验证 - >已禁用
web.config中
<configuration>
<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>
<authorization>
<deny users="?"/>
<allow users="statmaster"/>
</authorization>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>
<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/> …Run Code Online (Sandbox Code Playgroud) 我有一个PHP应用程序与microsoft访问数据库,它在Apache服务器上工作正常.但是,我需要在带有IIS 7的Windows服务器上运行它,这可能吗?
我编辑了这个问题
它仍然不起作用,用户写入附录然后在登录中按OK,没有任何反应
这是登录(vb.net)
Partial Class login
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Session("passcode") = TextBox1.Text
Response.Redirect("Default.aspx")
End Sub
End Class
Run Code Online (Sandbox Code Playgroud)
这是默认页面C#
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["passcode"] == "appendix")
{
Response.Write("OK !");
}
else
{
Response.Redirect("login.aspx");
}
}
}
Run Code Online (Sandbox Code Playgroud) 您好
有人可以告诉我在这段代码中我做错了什么
Protected Sub insert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Insert.Click
Dim mydb As New OleDbConnection
mydb = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= |datadirectory|database.mdb;Persist Security Info=True")
mydb.Open()
Dim sqlstring = "INSERT INTO [maintable] ([field1], [field2]) VALUES (@textbox1, @textbox2);"
Dim mydbcommand As New OleDbCommand(sqlstring, mydb)
TextBox1.Text = mydbcommand.Parameters.Add("@textbox1", OleDbType.VarChar).Value
TextBox2.Text = mydbcommand.Parameters.Add("@textbox2", OleDbType.VarChar).Value
mydbcommand.ExecuteNonQuery()
mydb.Close()
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
Run Code Online (Sandbox Code Playgroud)