Testing Multi-Tenancy on a Local Machine
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.
Open the
\Windows\System32\drivers\etc\
folder.Right-click the hosts file and give yourself modify permissions to that file.
Open the hosts file in a text editor.
Add the following line, replacing
mydemo
with the domain name you want to use:127.0.0.1 mydemo
Open the
\Users\\[YourUserName\]\Documents\IISExpress\config\
folder.Open the
Applicationhost.config
file in a text editor.Locate the section for your existing Orchard site, such as the following:
<site name="mydemo" id="nnnnnnnnn"/>
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" />
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:
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.)
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:
Open your site and attempt to start it.
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的更多相关文章
- The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
问题描述: 修改一个工具功能为读取excel文件中的数据(xls) 本机(windows server 2003 32位) 调试运行正常,部署到服务器(windows server 2003 64位) ...
- Asp.Net 之 WebService部署到服务器后出现" The test form is only available for requests from the local machine "
最近由于任务需要开发了一个WebService, 部署到服务器以后,出现上述问题,网上查找到如下解决方案: 问题原因: 从 NET Framework 1.1 起定义了一个名为 HttpPostLoc ...
- 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 ...
- 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 ...
- The test form is only available for requests from the local machine 解决方法
protocolsdocumentationsoapweb 当您尝试从远程计算机访问 Web 服务时,不会显示“调用”按钮.并且,您会收到以下错误信息: The test form is only ...
- 关于异常“The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine”的处理
我们在利用SqlBlukcopy技术倒2010 或者2007格式的文件到SqlServer 数据库的时候,会发生如下错误: 原因如下: 1.在用SQL SERVER 2005访问.xlsx文件(off ...
- 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服务项 ...
- 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 ---------------------------- ...
- 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 ...
- 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” , 解 ...
随机推荐
- 简单实现兼容各大浏览器的js复制内容到剪切板
因为网站文章需要提供几个按钮,单击后实现复制文章内容到剪贴板. 在网上搜索了很多内容,发现都比较乱这里自己整理下,分享给大家 效果图如下: 之前使用的是window.clipboardData.set ...
- MVC5 Identity 用用户名登录而不用电子邮件
1.修改AccountViewModels ·修改RegisterViewModel public class RegisterViewModel { [Required] [Display(Name ...
- 由window.history.back()引发的问题
由window.history.back()引发的问题 编写人:CC阿爸 2015-1-30 今天在这里,我想与大家一起分享由windows.history.back()引发的问题,笔者在实际开发当中 ...
- Vue.js学习 Item6 -- Class 与 样式绑定
数据绑定一个常见需求是操作元素的 class 列表和它的内联样式.因为它们都是 attribute,我们可以用 v-bind 处理它们:只需要计算出表达式最终的字符串.不过,字符串拼接麻烦又易错.因此 ...
- silverlight 退出系统(关闭当前网页),通过调用JS
确认后直接退出系统,关闭当前页面 页面部分: <HyperlinkButton x:Name="LinkExit" Style="{StaticResource L ...
- Java实现猜数游戏
利用Math.random()方法产生1~100的随机整数,利用JOptionPane.showInputDialog()方法产生一个输入对话框,用户可以输入所猜的数.若所猜的数比随机生成的数大,则显 ...
- 类似桌面背景壁纸随手指滑动--第三方开源--BackgroundViewPager
Android BackgroundViewPager在github上的项目主页是:https://github.com/MoshDev/BackgroundViewPager 下载下来即可运行
- How to executing direct SQL statements [Axapta, AX4.0, AX2009, AX2012]
Today I want to talk about executing SQL statements in X++ on both the current AX database and exter ...
- Redux介绍及基本应用
一.Redux介绍 Redux的设计思想很简单,就两句话: Web应用是一个状态机,神力与状态是一一对应的 所有的状态,保存在一个对象里面 二.Redux基本概念和API Store Store就是 ...
- 容易被忽略的事----sql语句中select语句的执行顺序
关于Sql中Select语句的执行顺序,一直很少注意这个问题,对于关键字的使用也很随意,至于效率问题,因为表中的数据量都不是很大,所以也不是很在意. 今天在一次面试的时候自己见到了,感觉没一点的印象, ...