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. ASP.NET MVC5 第4章

    参考资料<ASP.NET MVC5 高级编程>第5版 第4章 模型 本章所探讨的模型是要显示.保存.创建.更新和删除的对象. 基架指使用 MVC 提供的工具为每个模型对象的标准索引构建.创 ...

  2. C# 中解决页面刷新后字体等变大问题

    来源:http://blog.csdn.net/wcsjsdn/article/details/5109605 我们在.net开发中时常会遇到一个问题,那就是,当点击某个按钮后,调用js语句,当点击& ...

  3. MongoDB(1):常用操作命令大全

    MongoDB常用操作命令大全(转) http://www.jb51.net/article/48217.htm 成功启动MongoDB后,再打开一个命令行窗口输入mongo,就可以进行数据库的一些操 ...

  4. 模拟新浪微博textarea,刷新页面输入信息保留

    今天我们的产品经理提出一个新需求,模拟新浪微博textarea框,输入内容刷新页面保留信息. 我是用的方法是Html5 LocalStorage存储的,开始计划用cookie.或mysql存储,尝试了 ...

  5. 【代码】ini 文件读取工具类

    using System; using System.Runtime.InteropServices; using System.Text; namespace hrattendance.Common ...

  6. 第八章 管理类型(In .net4.5) 之 加强封装

    1. 概述 本章内容包括 访问控制符.属性 和 显式接口实现. 2. 主要内容 2.1 访问控制符 封装的核心是隐藏信息.访问控制符用来实现类型成员的访问控制. C#的访问控制符有:public, i ...

  7. 16.python中的浅拷贝和深拷贝

    在讲什么是深浅拷贝之前,我们先来看这样一个现象: a = ['scolia', 123, [], ] b = a[:] b[2].append(666) print a print b

  8. Linux学习-0626

    6.26 Linux的安装1.下载镜像包.iso,启动时设置光盘的包是安装包,就可以看到完成安装流程 安装CentOS 5.52.安装时分区,swap分区,根分区... Linux管理工具:1.Sec ...

  9. PHP闭包(Closure)初探

    不知不觉发现PHP已经出到了5.5版本,而自己一直在用PHP5.2,让我看起来像深山出来的小伙子一样,又土又落后.在我习惯在javascript中使用闭包之后,忽然间对PHP的闭包打起了兴趣. 于是乎 ...

  10. Python实现ID3(信息增益)

    Python实现ID3(信息增益) 运行环境 Pyhton3 treePlotter模块(画图所需,不画图可不必) matplotlib(如果使用上面的模块必须) 计算过程 st=>start: ...