If you are running locally and do not have a domain to map, you can edit your\Windows\System32\drivers\etc\hosts file to create a sample host.

 

If you are running locally and do not have a domain to map, you can edit your\Windows\System32\drivers\etc\hosts file to create a sample host.

The following advice is for Windows 7 or Windows Vista and was taken from Orchard Issue Tracker on CodePlex). These instructions assume that you're using WebMatrix and IIS Express to work with Orchard.

  1. Open the \Windows\System32\drivers\etc\ folder.

  2. Right-click the hosts file and give yourself modify permissions to that file.

  3. Open the hosts file in a text editor.

  4. Add the following line, replacing mydemo with the domain name you want to use:

    127.0.0.1 mydemo

  5. Open the \Users\\[YourUserName\]\Documents\IISExpress\config\ folder.

  6. Open the Applicationhost.config file in a text editor.

  7. Locate the section for your existing Orchard site, such as the following:

    <site name="mydemo" id="nnnnnnnnn"/>

  8. Under the <bindings> section, leave the default localhost binding, but copy it onto the next line and edit it to read:

    <binding protocol="http" bindingInformation="*:28923:mydemo" />

  9. Substitute the port number above for the one you copied from the default localhost binding.

If you do not want to run WebMatrix with admin privileges (which is not a good practice for security reasons), you need to follow the steps outlined in the article Handling URL Binding Failures in IIS Express as follows:

  1. Open a command window that has administrative privileges. (In All Programs > Accessories >Command Prompt, right-click the program shortcut and then click Run as administrator.)

  2. Run the following command:
    > netsh http add urlacl url=http://mydemo:28923/ user=everyone
    This can later be removed with the following command:
    > netsh http delete urlacl url=http://mydemo:28923/

Alternatively, you could run WebMatrix using admin privileges as follows:

  • Open WebMatrix with admin privileges. (Right-click the shortcut in Windows, then click Run as administrator.)

Finally:

  1. Open your site and attempt to start it.

  2. Locate the IIS Express icon in the taskbar and right-click it. You see your site name, where you can select to open it via its additional URL.

Remember to remove the item from the hosts file or comment out the line using the # character if you want to view the live site from the same domain name after you've deployed it to an ISP. You need to be very careful that you are looking at the remote site rather than the local one. Consider adding something to one or other of the themes to make the difference immediately apparent.

Note: Alternatively, instead of editing the hosts file, you can use the URL *.127-0-0-1.org.uk, where * is the name of your tenant or another name of your choosing. This will loop back to localhost and is sufficient for testing multi-tenancy locally.

Testing Multi-Tenancy on a Local Machine的更多相关文章

  1. The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

    问题描述: 修改一个工具功能为读取excel文件中的数据(xls) 本机(windows server 2003 32位) 调试运行正常,部署到服务器(windows server 2003 64位) ...

  2. Asp.Net 之 WebService部署到服务器后出现" The test form is only available for requests from the local machine "

    最近由于任务需要开发了一个WebService, 部署到服务器以后,出现上述问题,网上查找到如下解决方案: 问题原因: 从 NET Framework 1.1 起定义了一个名为 HttpPostLoc ...

  3. The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine. (System.Data)

    When you try to import Excel 2007 or later “.xlsx” files into an SQL Server 2008 database you may ge ...

  4. WinServer 之 发布WebService后调用出现" The test form is only available for requests from the local machine. "

    当您尝试从远程计算机访问 Web 服务时,不会显示“调用”按钮.并且,您会收到以下错误信息: The test form is only available for requests from the ...

  5. The test form is only available for requests from the local machine 解决方法

      protocolsdocumentationsoapweb 当您尝试从远程计算机访问 Web 服务时,不会显示“调用”按钮.并且,您会收到以下错误信息: The test form is only ...

  6. 关于异常“The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine”的处理

    我们在利用SqlBlukcopy技术倒2010 或者2007格式的文件到SqlServer 数据库的时候,会发生如下错误: 原因如下: 1.在用SQL SERVER 2005访问.xlsx文件(off ...

  7. The test form is only available for requests from the local machine

    使用浏览器测试Web服务时出现提示“The test form is only available for requests from the local machine.”的解决办法 在Web服务项 ...

  8. Microsoft SQL Server 17导出xlsx文件时报错:The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. (System.Data)

    导出数据时报错: 如果你是导出office 2007格式 TITLE: SQL Server Import and Export Wizard ---------------------------- ...

  9. mongodb 安装遇到问题:the domain,user name and/or password are incorrect.remember to use"." for the domain if the account is on the local machine

    安装mongoDB遇到如下问题:the domain,user name  and/or password are incorrect.remember to use"." for ...

  10. connect: Address is invalid on local machine or port is not valid on remote

    idea 运行正常打成jar包运行提示“connect: Address is invalid on local machine or port is not valid on remote” , 解 ...

随机推荐

  1. WinRt BottomAppBar

    BottomAppBarDemo.xaml <Page.BottomAppBar> <AppBar> <StackPanel Orientation="Hori ...

  2. project 2010 使用技巧

    快捷键 设置任务子任务 ALT+SHIFT+向右方向键 1.工作时间设置 新建一个日历后,可以在 “项目 >> 项目信息 >> 日历” 中进行选择

  3. linux 常用命令及技巧

    linux 常用命令及技巧 linux 常用命令及技巧:linux 常用命令总结: 一. 通用命令: 1. date :print or set the system date and time 2. ...

  4. php __clone需要注意的问题

      当一个对象的属性是另外一个对象时,当有一个对象复制该对象时,当复制到这个属性(一个对象)时,只复制这个属性(对象)的引用,而不复制引用的对象. class Account{ public $bal ...

  5. 基于jQuery打造的选项卡向上弹出jquery焦点图切换特效

    基于jQuery打造的选项卡向上弹出jquery焦点图切换特效 鼠标经过标题栏,会出现层特效向上滑动,并且在同时进行幻灯片切换,效果十分不错. 有兴趣的童鞋可以下载看看,在IE6方面兼容性也不错,只有 ...

  6. psd图片到html

    正确的做法是:拿到psd后,先不要做别的,直接在文本编辑器中将网页的框架写出来,不要假设这块将来css要去怎么渲染,完全自然化的标签,不加任何的css.写完之后在各个浏览器运行之后确保大体定位都没有问 ...

  7. 访问svc 文件,编译器错误消息: CS0016,未能写入输出文件

    编译错误              说明: 在编译向该请求提供服务所需资源的过程中出现错误.请检查下列特定错误详细信息并适当地修改源代码.             编译器错误消息: CS0016: 未 ...

  8. 第六节:宿主如何使用AppDomain

    前面已经讨论了宿主以及宿主加载CLR的方式.同时还讨论了宿主如何告诉CLR创建和卸载AppDomain.为了使这些讨论更加具体,下面将描述一些常见的宿主和AppDomain使用情形.特别地,我要解释不 ...

  9. 9.python的布尔类型与流程控制

    布尔类型其实可以算是一种特殊的数字,下面是 help() 函数得到的帮助信息: Help on class bool in module __builtin__: class bool(int) | ...

  10. rails使用 rake db:migrate 提示 Migrations are pending; run 'rake db:migrate RAILS_ENV=development' to resolve this issue.

    首先得特么建立数据库 : rake db:create 实际问题是没有int应该用integer http://www.rubycc.com/column/rails3.2.3/rails.htm