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
mydemowith the domain name you want to use:127.0.0.1 mydemo
Open the
\Users\\[YourUserName\]\Documents\IISExpress\config\folder.Open the
Applicationhost.configfile 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” , 解 ...
随机推荐
- 2_JavaScript日期格式化
第二章 JavaScript 时间格式化 2.1 Ticks 转换为常规日期 2.2 常规日期格式化 <input type="button" value=&qu ...
- Hub control
Hub(中心) 中心页是用户进入应用的入口点.中心页在丰富的平移视图中显示内容,这样用户一眼就能看见新鲜有趣的内容,从而吸引他们深入了解你的应用中的更多内容.中心显示不同的内容类别,每个类别映射到应用 ...
- Objective-C特点
1.兼容性 OC是一种面向对象的C语言,在OC的代码中可以有C和C++语句,它可以调用C函数,也可以通过C++对象访问方法. 2.字符串 OC通常不使用C语言风格的字符串.大多数情况下(CoreFou ...
- memcached for windows 修改端口和最大内存
解压后只要在命令窗口中输入下面命令c:\memcached\memcached.exe -d install 就可以把memcached安装为windows服务了. 启动该服务后,memcached ...
- spark streaming kafka1.4.1中的低阶api createDirectStream使用总结
转载:http://blog.csdn.net/ligt0610/article/details/47311771 由于目前每天需要从kafka中消费20亿条左右的消息,集群压力有点大,会导致job不 ...
- php手册学习
整型:int 转换为整型:intval(str) 32位最大值64位最大值 不存在整除语法:应用round();四舍五入.integer去除小数. $a = 1234; //十进制数 $a = ...
- 容易被忽略的事----sql语句中select语句的执行顺序
关于Sql中Select语句的执行顺序,一直很少注意这个问题,对于关键字的使用也很随意,至于效率问题,因为表中的数据量都不是很大,所以也不是很在意. 今天在一次面试的时候自己见到了,感觉没一点的印象, ...
- 北京汽车官网经销商信息抓取(解析html标签)
1.网站地址http://www.baicmotor.com/dealer.php 2.使用firefox查看后发现,此网站的信息未使用json数据,而是简单那的html页面而已 3.使用pyquer ...
- C#中virtual和abstract的区别
先说区别: virtual意思是虚拟,abstract意思是抽象. virtual只修饰方法,abstract修饰方法和类. virtual方法必须有实现,abstract方法必须没有实现. publ ...
- open/fopen read/fread write/fwrite区别
fopen /open区别 UNIX环境下的C 对二进制流文件的读写有两套班子:1) fopen,fread,fwrite ; 2) open, read, write这里简单的介绍一下他们的区别.1 ...