专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > .NET Framework

使用机器名可以正常访问,但使用IP地址就不行了!解决方法

发布时间:2011-06-23 14:39:37 文章来源:www.iduyao.cn 采编人员:星星草
使用机器名可以正常访问,但使用IP地址就不行了!
奇怪了,使用机器名可以正常访问,但使用IP地址就不行了!
在Web项目中,用到了InfoPath,用了Microsoft   SharePoint,ASP.NET的State   Menagement中,Session   state   mode使用是SQLServer
使用机器名可以正常访问,但是使用IP地址就出现以下错误信息

Server   Error   in   '/ '   Application.
--------------------------------------------

Object   reference   not   set   to   an   instance   of   an   object.  
Description:   An   unhandled   exception   occurred   during   the   execution   of   the   current   web   request.   Please   review   the   stack   trace   for   more   information   about   the   error   and   where   it   originated   in   the   code.  

Exception   Details:   System.NullReferenceException:   Object   reference   not   set   to   an   instance   of   an   object.

Source   Error:  

An   unhandled   exception   was   generated   during   the   execution   of   the   current   web   request.   Information   regarding   the   origin   and   location   of   the   exception   can   be   identified   using   the   exception   stack   trace   below.    

Stack   Trace:  


[NullReferenceException:   Object   reference   not   set   to   an   instance   of   an   object.]
      Microsoft.Office.Server.Administration.SqlSessionStateResolver.System.Web.IPartitionResolver.ResolvePartition(Object   key)   +77
      System.Web.PartitionManager.GetPartition(IPartitionResolver   partitionResolver,   String   id)   +244
      System.Web.SessionState.SqlSessionStateStore.GetConnection(String   id,   Boolean&   usePooling)   +52
      System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext   context,   String   id,   SessionStateStoreData   item,   Object   lockId,   Boolean   newItem)   +178
      System.Web.SessionState.SessionStateModule.OnReleaseState(Object   source,   EventArgs   eventArgs)   +355
      System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   +92
      System.Web.HttpApplication.ExecuteStep(IExecutionStep   step,   Boolean&   completedSynchronously)   +64

 


--------------------------------------------
Version   Information:   Microsoft   .NET   Framework   Version:2.0.50727.42;   ASP.NET   Version:2.0.50727.42  

请高手给予指点啊!谢谢了!

------解决方案--------------------
如果可以使用机器名或者localhost可以访问,例如:http://localhost/...
想改为IP访问。
1.打开IIS,找到文件目录,右键-> 所有任务-> 权限向导-> 下一步....都点Yes;
2.防火墙-> 高级--> 本地连接--> 设置--> web服务器(http),打勾,即可!
------解决方案--------------------
SharePoint网站可以在外网访问,通过备用访问映射就可以做到。
如果能PING通IP却PING不通机器名,那就是DNS域名解析的问题,
可以通过修改etc\hosts文件解决。
------解决方案--------------------
楼主,按下面的做法试试
1.打开IIS,找到文件目录,右键-> 所有任务-> 权限向导-> 下一步....都点Yes;
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: