在localhost上运行网站的差异,并在服务器上托管后,在ASP.NET C中创建的网站# [英] Running difference of website on localhost and after hosting it on server , website created in in ASP.NET C#

查看:77
本文介绍了在localhost上运行网站的差异,并在服务器上托管后,在ASP.NET C中创建的网站#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我实现了一个网站其中多个用户可以一次登录来自其他位置。现在我在我的localhost iis服务器上测试它。我运行该项目,它将在标签中显示。然后我停下来跑第二次。没有关闭谷歌浏览器上的上一个选项卡。然后我点击第一个标签作为项目 运行模式然后通过第一次运行项目 活动将 get 激活,两个标签中都可以正常工作。现在我故意执行导致异常的操作,因此 使运行项目进入调试模式( 它必须)和我的网站 seconf标签中 get 明显受到影响。现在我的问题 网站 运行相同但 不同选项卡和一个原因终止也会影响其他 项目 get 停止运行。所以我的问题 我主持网站 if 一个用户制作导致网站停止的内容也会影响其他用户。或者在托管网站后为不同的用户或会话创建的不同实例。我是第一次托管我的网站不知道应该采取什么护理请指导这个主题哪个关心我应该服用。并回答我的问题。
请注意,有哪些更改意味着 localhost iis到服务器上的托管。

谢谢。





我的尝试:



你好,



我实现了一个网站,多个用户可以从不同的位置一次登录。现在我在我的localhost iis服务器上测试它。我运行该项目,它将出现在新标签中。然后我停下来跑第二次。没有关闭谷歌浏览器上的上一个选项卡。然后我点击第一个选项卡,因为项目处于运行模式,然后网站处于活动状态,通过运行项目第一次将激活,在两个选项卡中都工作正常。现在我故意执行导致异常的操作,因此运行项目进入调试模式(因为它必须),我的seconf选项卡中的网站也明显受到影响。现在我的问题是网站运行相同,但在不同的选项卡和一个原因终止也影响其他项目停止运行。所以我的问题是当我主持网站时,如果一个用户做出导致网站停止的东西也会影响其他用户。或者在托管网站后为不同的用户或会话创建不同的实例。我是第一次主持我的网站不知道应该采取什么护理请指导这个主题我应该采取什么。并回答我的问题。

请注意从localhost iis到服务器托管有什么变化。



谢谢。

解决方案

很难理解你写的是什么。但是,这个块我理解得足以回答。

引用:

当我主持网站时如果一个用户做出导致网站停止的东西也会影响其他用户。或者在托管网站后为不同的用户或会话创建不同的实例

如果网站崩溃,那么所有会话都将丢失,除非您使用的会话模式与默认会话不同。请参阅会话状态模式 [ ^ ]



如果用户的浏览器崩溃而不是IIS然后只有该用户受到影响。事实上,他们的会话仍将在服务器上处于活动状态,因为服务器不知道客户端崩溃。



这完全取决于你如何设置IIS。


Hello,

  I implement one website where multiple user can login at a time from different location. now i am testing it on my localhost iis server. i run the project it will appear in new tab. then i stop it and run second time. without closing previous tab on google chrome. then i click on first tab as project is in running mode then website is active by running project first time will get active, in both tab both are work fine. now i intentionally perform action that cause exception so it is make running project goes into debug mode(as it have to) and my website in seconf tab also get affected obviously. now my question is website is running same but in different tab and one cause termination  also affect other as project get stop running. so my question is when I host the website if one user make something which cause website stop will also affect the  other user. or different instances are created for different user or session after hosting website. I am hosting my website first time do not aware what care should to take please guide on this topic which care should i take. and also give answer of my question.
please mention also what changes are there means from localhost iis to hosting on server.

thank you.



What I have tried:

Hello,

I implement one website where multiple user can login at a time from different location. now i am testing it on my localhost iis server. i run the project it will appear in new tab. then i stop it and run second time. without closing previous tab on google chrome. then i click on first tab as project is in running mode then website is active by running project first time will get active, in both tab both are work fine. now i intentionally perform action that cause exception so it is make running project goes into debug mode(as it have to) and my website in seconf tab also get affected obviously. now my question is website is running same but in different tab and one cause termination also affect other as project get stop running. so my question is when I host the website if one user make something which cause website stop will also affect the other user. or different instances are created for different user or session after hosting website. I am hosting my website first time do not aware what care should to take please guide on this topic which care should i take. and also give answer of my question.
please mention also what changes are there means from localhost iis to hosting on server.

thank you.

解决方案

It is very hard to understand what you wrote. However, this block I understand enough to answer.

Quote:

when I host the website if one user make something which cause website stop will also affect the other user. or different instances are created for different user or session after hosting website

If the website crashes then all of your sessions will be lost, unless you are using a different mode of session than the default. See Session-State Modes[^]

If a user's browser crashes and not IIS then only that user is affected. In fact, their session will still be active on the server because the server has no idea that the client crashed.

It all depends on how you setup IIS.


这篇关于在localhost上运行网站的差异,并在服务器上托管后,在ASP.NET C中创建的网站#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆