如何配置asp.net服务器?

如何配置asp.net服务器?,第1张

先安装IIS

6.0(推荐),在安装的时候选择asp.net组件,安装完成之后就会支持asp.net很简单。如果需要安装到asp.net2.0则需要下载2.0,然后进行安装,安装的时候注意关闭其它所运行的正常。

文章来源:服务中国

http://www.chinaser.net

#region Language Operation

/// <summary>

/// 设置app.config中的Language的value.

/// </summary>

/// <param name="AppKey">key</param>

/// <param name="AppValue">value</param>

public void SetLanguageValue(string AppKey, string AppValue)

{

XmlDocument xDoc = new XmlDocument()

string configpath = System.Reflection.Assembly.GetExecutingAssembly().CodeBase + ".config"

string path = configpath.Substring(8)

//此处配置文件在程序目录下

xDoc.Load(path)

XmlNode xNode

XmlElement xElem1

XmlElement xElem2

xNode = xDoc.SelectSingleNode("//appSettings")

xElem1 = (XmlElement)xNode.SelectSingleNode("//add[@key='" + AppKey + "']")

if (xElem1 != null)

{

xElem1.SetAttribute("value", AppValue)

}

else

{

xElem2 = xDoc.CreateElement("add")

xElem2.SetAttribute("key", AppKey)

xElem2.SetAttribute("value", AppValue)

xNode.AppendChild(xElem2)

}

xDoc.Save(path)

}

public void SetCurrentLanguageIMG()

{

设置调用的资源文件语言包

switch (OctoSTPNet.Method.Language.LanguageType)

{

case "zh-CHS":

{

menuSChinese1.Checked = Janus.Windows.UI.InheritableBoolean.True

menuEnglish.Checked = Janus.Windows.UI.InheritableBoolean.False

menuTChinese.Checked = Janus.Windows.UI.InheritableBoolean.False

// menuSChinese.Image = OctoSTPNet.Properties.Resources.Tip

//menuEnglish.Image = null

//menuTChinese.Image = null

}

break

case "zh-TW":

{

menuSChinese1.Checked = Janus.Windows.UI.InheritableBoolean.False

menuEnglish.Checked = Janus.Windows.UI.InheritableBoolean.False

menuTChinese.Checked = Janus.Windows.UI.InheritableBoolean.True

}

break

default:

{

menuSChinese1.Checked = Janus.Windows.UI.InheritableBoolean.False

menuEnglish.Checked = Janus.Windows.UI.InheritableBoolean.True

menuTChinese.Checked = Janus.Windows.UI.InheritableBoolean.False

}

break

}

}

private void englishToolStripMenuItem_Click_1(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)

{

SetLanguageValue("LanguageType", "EN")

menuSChinese1.Checked = Janus.Windows.UI.InheritableBoolean.False

menuEnglish.Checked = Janus.Windows.UI.InheritableBoolean.True

menuTChinese.Checked = Janus.Windows.UI.InheritableBoolean.False

MessageBoxManager.Show("Please Re-Start OctO to view new Language!", "OctO-Change Language")

}

private void chinaCHSToolStripMenuItem_Click_1(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)

{

SetLanguageValue("LanguageType", "zh-CHS")

menuSChinese1.Checked = Janus.Windows.UI.InheritableBoolean.True

menuEnglish.Checked = Janus.Windows.UI.InheritableBoolean.False

menuTChinese.Checked = Janus.Windows.UI.InheritableBoolean.False

MessageBoxManager.Show("Please Re-Start OctO to view new Language!", "OctO-Change Language")

}

private void chinaTWToolStripMenuItem_Click_1(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)

{

SetLanguageValue("LanguageType", "zh-TW")

menuSChinese1.Checked = Janus.Windows.UI.InheritableBoolean.False

menuEnglish.Checked = Janus.Windows.UI.InheritableBoolean.False

menuTChinese.Checked = Janus.Windows.UI.InheritableBoolean.True

MessageBoxManager.Show("Please Re-Start OctO to view new Language!", "OctO-Change Language")

}

#endregion

微软webcast系列课程中其中一个系列.下面是网址.

http://www.microsoft.com/china/msdn/events/webcasts/shared/webcast/Series.aspx

你可以去这里看下,有很多的系列的课程供你下载,有很清楚的视频,还有相关视频中设计的源代码.

祝你找到好的学习方法


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/52279.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-02-25
下一篇2023-02-25

发表评论

登录后才能评论

评论列表(0条)

    保存