为什么在ii7上不能mvc中使用wcff

IIS7 配置大全(ASP.NET 2.0, WCF, ASP.NET MVC,php)
转载 & & 作者:
IIS7.0版本出来之后,确实功能上比以前的版本功能要强大一些,兼容性也比较好,但是配置起来却有一点麻烦,本文就是为大家介绍一下如何在iis7.0中配置ASP、PHP环境和win2008的共享配置
一、IIS7.0 配置 ASP.NET2.0
&&& 1、ASP.NET 2.0 部署
1)首先打开win7 的特性,路径我已标注
下面选中的是ASP.NET2.0, 如果要支持ASP.NET1.1,你的选中IIS6兼容
2.)设置安全选项
3)添加.Net经典应用程序池
4)将站点转换为Application
5)为站点添加 yourmachinename\IIS_IUSRS权限
6.)右键站点—Manage Application-Advanced Setting 设置当前站点为Classic .Net AppPool
&& 2. 部署WCF
&&& 打开“开始|所有程序|附件|命令提示符”,输入“cd C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation”,回车。再输入“ServiceModelReg.exe -i”,回车。
&& 3. 部署ASP.NET MVC
在IIS7下,部署ASP.NET MVC是最方便的,只需做如下的配置,添加一个集成模式的.NET Application Pool,将它指定给你的ASP.NET MVC Application。
注:vista和Win7 正版用的都是IIS7,所以配置是一样的。
二、windows server 2008 iis7.0的共享配置
& 配置windows server 2008 iis7.0的共享主要是为了方便如果您有2台IIS服务器,我第一台的IIS有个网站,名称为winos吧,第2台IIS没有网站(把默认的删除了),配置好共享配置以后,然后刷新第2台IIS服务器就出来第一台我建的名称为winos网站了,并且我随意在哪台更改什么配置,会自动同步到另一台的IIS那边,原因很简单因为他们使用的是一个配置文件。
&& 1、新建2个共享文件夹,winos存我的网页文件,共享存我的配置文件
&& 2、在第一台的iis上新建一个网站,名称为winos,路径为我共享的的winos文件夹的路径。
1)设置一下连接的凭据
2)看看是否能够在本机浏览
&& 3、配置共享配置,双击共享的配置
1)点击右边导出配置,我们先把配置文件导出
2)在物理路径哪里填写我前面共享的文件,并填写加密的密钥
3)点击连接为设置连接的凭据,点击确定
4)配置位置,启用共享的配置,并填写相关信息
5)输入加密密钥的密码
OK我们第一台的IIS配置完毕
&& 4、:配置第2台IIS服务器(如下图,第2台IIS服务器一个网站也没有)
1)点击共享的配置,填写相关信息
2)输入加密的密钥
3)点击刷新
4)我们在第一台iis服务器建的名称为winos的网站出来了
5)输入网址浏览一下
三、Win7下配置IIS 7.0 php操作环境
注:我们采用的是IIS v7.0+php+mysql+zend在Win7下构建操作环境。
&& 1.、安装IIS v7.0
1)控制面板-程序和功能-打开或关闭Windows 功能
2)测试是否成功安装IIS v7.0,在浏览器输入:
http://localhost/
http://127.0.0.1/%3C/A%3E%3C/P
出现如上界面说明成功安装IIS v7.0
3)新建站点:(默认的站点用作asp/asp.net/,启动8080端口,即访问使用http://localhost:8080/)
&& 2.、配置PHP环境
&& PHP下载地址:http://soft.huweishen.com/soft/263.html。
1)下载php之后解压到G:\php
2)添加ISAPI筛选器:
3)添加脚本映射:
4)添加应用程序池:
5)更改站点应用程序池,并添加默认文档index.php。
6)修改G:/PHP/php.ini-list 文件名为php.ini,复制到F:/windows/(双系统,Windows 7所在盘符),修改php.ini:使之支持GD,mysql等。
7)修改extension_dir目录:
8)复制libmcrypt.dll,libmysql.dll,php5ts.dll三个文件到F:/windows/System32(双系统,Windows 7所在盘符)下,在默认目录新建一个index.php
9)输入&A href='http://127.0.0.1:8080/'&http://127.0.0.1:8080/&/A& 校验是否成功安装php :
&& 3.、添加Mysql数据库:
&&& Mysql下载地址:。
1)安装Mysql:
2)设置Mysql(这里我们就不详细讲解了,配置教程详见。)
3)校验mysql是否正确安装:
&&&&&&&& a、检测服务管理器中:mysql是否启动:
&&&&&&&& b、使用phpmyadmin能否接入mysql:
&& OK mysql已经正确安装,可以使用了。
& 因为Zend Optimizer的安装不需要任何配置,所以此处省略。安装成功Zend Optimizer之后我们win7下的PHP环境就配置成功了。
& IIS7.0的功能真的是非常实用,功能齐全,比如它的最大化的桌面图形化操作系统,可维护性优秀,且基于IIS v6.0/v7.0(2008),可以支持的脚本相当完整,不仅支持Linux无法支持的asp/asp.net,还可以安装php、mysql、zend实现php环境。同时,利用Serv-U可以实现ftp管理。操作简单,无需键入任何命令就可实现全能型主机。真的是值得下载一用啊!!
IIS7.0下载地址:。本文部分资料参考网络。
您可能感兴趣的文章:
大家感兴趣的内容
12345678910
最近更新的内容
常用在线小工具/Net/dxcern/userd/tbl/hypertext/WWW/Protocols/rfc1341/5_Content-Transfer-Encoding.html
The Content-Transfer-Encoding
Header FieldMany Content-Types which could usefully
transported
are represented,
in their "natural" format, as 8-bit
character or binary data. Such data
transmitted
protocols.
restricts mail
messages to 7-bit
US-ASCII data
character lines.
It is necessary, therefore, to define
re-encoding
data into a 7-bit short-line
indicated by a new "Content-Transfer-Encoding"
header field.
The Content-Transfer-Encoding
field is used to indicate
transformation
in order to
the body in an acceptable manner
for transport.
Unlike Content-Types, a proliferation
Content-Transfer-
undesirable and unnecessary.
establishing
Content-Transfer-Encoding
There is a tradeoff
between the
desire for a compact and efficient
largely-binary
and the desire for a readable encoding
of data that is mostly, but not
entirely, 7-bit
reason, at least two encoding mechanisms
are necessary:
a "readable" encoding
and a "dense" encoding.
The Content-Transfer-Encoding field
is designed
an invertible
mapping between the "native" representation
a type of data and a
representation
transport protocols,
those defined by RFC 821
(SMTP). This
The field's value is a
single token
specifying the type of encoding,
enumerated
Content-Transfer-Encoding := "BASE64" / "QUOTED-PRINTABLE" /
/ "7BIT" /
"BINARY" / x-token
These values are not case sensitive.
BASE64 and
bAsE64 are all equivalent. An encoding
7BIT requires that the
body is already in a seven-bit mail-
ready representation.
the default value -- that is,
"Content-Transfer-Encoding:
Content-Transfer-Encoding header
field is not present.
The values "8bit", "7bit", and "binary"
encoding has
been performed. However, they are
potentially
useful as indications
of the kind of data contained
the kind of encoding that might
need to be performed for transmission
that the data is
all represented as
short lines
of US-ASCII data.
"8bit" means that
may be non-ASCII characters (octets
with the high-order bit set). "Binary"
means that not
may non-ASCII
characters be present, but also that
are not necessarily short
enough for SMTP transport.
The difference between
conceivable
"binary" token
is that "binary"
does not require
adherence to any limits on line length
CRLF semantics,
while the bit-width tokens do
such adherence.
If the body contains
7-bit, the
appropriate
Content-Transfer-Encoding token
must be used
unencoded 8 bit wide data). If the
body contains binary
"binary" Content-Transfer-Encoding
NOTE:The distinction between the Content-Transfer-Encoding
etc. may seem unimportant, in
all of them really mean "none" --
encoding of the data for transport.
However, clear
labeling will be
future mail transport systems
with differing capabilities in
transporting data that do not meet
the restrictions
821 transport.
publication
standardized
Internet transports for which it
is legitimate
to include unencoded
8-bit or binary data
circumstances
which the "8bit" or
Content-Transfer-Encoding is actually
in the event that 8-bit or binary
transport becomes a reality
in Internet mail, or
conjunction
with any other 8-bit or
binary-capable
transport mechanism, 8-bit or
should be labeled as such
using this mechanism.
NOTE:The five values
Content-Transfer-
nothing about the Content-Type
than the algorithm by which
it was encoded or the
system requirements if unencoded.
Implementors
necessary,
Transfer-Encoding
values, but must use an x-token,
a name prefixed by "X-"
to indicate its non-standard status,
"Content-Transfer-Encoding:
x-my-new-encoding".
unlike Content-Types and subtypes,
the creation
Content-Transfer-Encoding
explicitly
discouraged,
interoperability with
little potential benefit. Their
is allowed only
agreement between
cooperating
user agents.
If a Content-Transfer-Encoding header
field appears as
header, it applies to the entire
body of that
a Content-Transfer-Encoding
appears as part
of a body part's headers, it applies
the body of that
"multipart" or
"message", the
Content-Transfer-Encoding is
permitted to have any
value other
(e.g., "7bit",
"8bit", etc.) or "binary".
It should be noted that email is
character-oriented, so that
mechanisms
here are mechanisms
for encoding
arbitrary byte streams,
not bit streams.
If a bit stream
be encoded via one of these
mechanisms, it must first be
to an 8-bit byte stream using the
network standard
("big-endian"),
in which the earlier bits in a
stream become the higher-order bits
in a byte.
A bit stream
at an 8-bit boundary must be padded
with zeroes.
This document provides
a mechanism for noting
of such padding in the case of
the application Content-Type,
has a "padding" parameter.
The encoding mechanisms defined here
explicitly
for example, suppose
an entity has
header fields such
Content-Type: text/ charset=ISO-8859-1
Content-transfer-encoding: base64
This should be interpreted to mean
that the body is a base64
data that was originally
in ISO-8859-1,
and will be in that
character set again after decoding.
The following sections will define
the two standard encoding
mechanisms.
definition
content-transfer-
encodings is explicitly discouraged
when absolutely
necessary.
All content-transfer-encoding
namespace except that
explicitly
for future use. Private
agreements
content-transfer-encodings
explicitly
discouraged.
Certain Content-Transfer-Encoding
values may only be used on
Content-Types.
particular,
forbidden to
use any encodings other than "7bit",
"8bit", or
Content-Type
that recursively includes
other Content-Type
"multipart"
Content-Types.
All encodings that
are desired for
bodies of type
multipart or message
by encoding
the actual body that needs to
RESTRICTIONS:Though
prohibition
content-transfer-encodings
data of type
multipart or message
restrictive, it
prevent nested
encodings, in which data are
through an encoding algorithm
order to be
viewed. Nested encodings
considerable complexity
obvious efficiency problems
such multiple encodings, they
of a message.
In particular, they
can imply that
several decoding
operations are necessary simply to
a message contains.
Banning nested
encodings may complicate the job
of certain
seems less of a problem than
the effect of nested
on user agents.
NOTE ON THE RELATIONSHIP BETWEEN
CONTENT-TYPE
TRANSFER-ENCODINGIt
may seem that the Content-Transfer-Encoding
could be inferred from the characteristics
Content-Type
to be encoded, or, at the very least,
that certain Content-Transfer-Encodings
Content-Types.
are several
reasons why this is
not the case. First, given
the varying
transports used
mail, some encodings may be
appropriate
for some Content-Type/transport combinations
others. (For
8-bit transport, no
would be required for text
sets, while
are clearly required for 7-bit
Second, certain Content-Types
may require different
transfer encoding under different
circumstances.
For example, many
PostScript bodies might
short lines of 7-bit
data and hence require little or
encoding. Other PostScript bodies
(especially
2 PostScript's binary encoding mechanism)
may only be
reasonably represented
transport encoding.
since Content-Type is
intended to be an open-ended
specification
mechanism,
specification
association between Content-Types
and encodings effectively
the specification of an application
protocol with a
lower-level
transport. This is not desirable
the developers of a Content-Type
should not have to be aware
all the transports in use and what
their limitations are.
NOTE ON TRANSLATING
ENCODINGSThe
quoted-printable
conversion between
them is possible.
conversion
the handling
of line breaks. When converting
quoted-printable
a CRLF sequence. Similarly,
a CRLF sequence
in base64 data
quoted-printable
line break, but ONLY when converting
text data.
MODEL:There
confusion, in
of this memo, regarding
model for when email data was
to be converted
encoded, and in particular
how this process would
affect the
treatment of CRLFs, given that the
representation
greatly from system to system. For
reason, a canonical
Appendix H.
Quoted-Printable Content-Transfer-EncodingThe Quoted-Printable encoding is
intended to represent
largely consists of octets that correspond
to printable
characters in the
ASCII character set.
It encodes
a way that
the resulting octets are unlikely
modified by mail transport.
If the data being
form of the data remains
recognizable by humans.
A body which
may also be
encoded in Quoted-Printable to ensure
integrity of the data should
pass through
character-translating, and/or line-wrapping
In this encoding, octets are to be
represented as determined
following rules:
representation)Any
indicating
a line break according to the
convention of the canonical form
being encoded, may
be represented by an "=" followed
a two digit hexadecimal representation
value. The digits
of the hexadecimal alphabet, for
purpose, are "ABCDEF".
Uppercase letters must
when sending hexadecimal
data, though
implementation
letters on receipt. Thus, for
form feed)
can be represented by "=0C", and
value 61 (ASCII
represented
alternative encoding,
this rule is mandatory.
Rule #2: (Literal representation)
33 through 60 inclusive, and 62 through
inclusive, MAY be represented
characters
correspond
octets (EXCLAMATION
through LESS THAN,
respectively).
Rule #3: (White Space)Octets with values of 9 and
represented
characters,
respectively,
represented
at the end of an encoded line. Any
or SPACE characters on
an encoded
by a printable
character.
particular, an "="
indicating
soft line break (see
rule #5) may follow
one or more
TAB (HT) or SPACE characters.
octet with value
9 or 32 appearing at the end
an encoded line must
represented
because some MTAs
(Message Transport
Agents, programs
messages from
one user to another, or perform a
such transfers) are known
are known to remove
"white space"
characters from the
Therefore,
Quoted-Printable
any trailing white
space on a line
must be deleted, as it will necessarily
have been added by intermediate
transport agents.
Rule #4 (Line Breaks)A line
independent
representation
following the
representation
encoded, must be represented
by a (RFC 822) line
sequence, in
encoding. If
isolated CRs and LFs, or LF CR
CR LF sequences are allowed to
according to
form, they must be
represented
"=0D=0A" notations
respectively.
Note that many implementation may
local representation
of various content types directly.
In particular, this may apply to
plain text material on
systems that
newline conventions other than
delimiters. Such an implementation
is permissible,
generation
line breaks must be generalized
account for the case where alternate
representations of
newline sequences
Breaks)The
Quoted-Printable
REQUIRES that encoded lines be no
more than 76
characters long. If
longer lines are to be encoded with
Quoted-Printable encoding,
'soft' line breaks must
An equal sign
line indicates such
a non-significant ('soft')
break in the encoded text. Thus if
of the line is a
single unencoded line that says:
Now's the time for all folk to come to the aid of
their country.
represented,
Quoted-Printable
encoding, as
Now's the time =
for all folk to come=
to the aid of their country.
This provides a mechanism with
way as to be restored by the user
character limit
characters,
including any equal
Since the hyphen character ("-")
is represented as itself in
Quoted-Printable
be taken, when
encapsulating
a quoted-printable encoded body in
a multipart
that the encapsulation boundary does
appear anywhere in the encoded
(A good strategy is to
a boundary that includes a character
sequence such as
"=_" which can
never appear in a quoted-printable
definition
document.)
The quoted-printable encoding
represents something of
compromise
readability
reliability
transport.
quoted-printable
encoding will work reliably over
most mail gateways, but may
translation
(In theory, an EBCDIC
gateway could decode a quoted-printable
such gateways do not
yet exist.)
confidence
Content-Transfer-Encoding.
A way to get reasonably reliable
transport through EBCDIC gateways
is to also quote the ASCII
characters
!"#$@[\]^`{|}~
according to rule #1.
See Appendix
B for more information.
Because quoted-printable data is
line-oriented,
it is to be expected that the breaks
quoted printable
altered in
transport,
same manner
text mail has
always been altered
in Internet mail
conventions.
alterations are likely to constitute
corruption
more sensible
the base64
encoding rather
than the quoted-printable encoding.
Base64 Content-Transfer-EncodingThe
Content-Transfer-Encoding
represent arbitrary
of octets in a form that
not humanly readable. The encoding
and decoding
algorithms
are simple,
but the encoded data are consistently
only about
33 percent larger than
the unencoded data.
This encoding
based on the one used in Privacy
Enhanced Mail applications,
defined in RFC 1113.
encoding is
1113, with one change:
base64 eliminates
mechanism for embedded
clear text.
A 65-character subset of US-ASCII
is used, enabling
represented per printable character.
(The extra 65th
character, "=",
processing
function.)
This subset has the important
represented
identically
including US ASCII,
and all characters
represented
identically
versions of EBCDIC.
popular encodings, such as the encoding
and the base85 encoding specified
of Level 2 PostScript,
do not share
properties,
fulfill the
portability requirements a binary
transport encoding for mail must
The encoding process represents 24-bit
groups of input
strings of 4 encoded characters.
Proceeding from
concatenating
8-bit input
groups. These 24 bits are then
treated as 4 concatenated 6-bit groups,
translated
into a single digit in the base64
alphabet. When
encoding a bit stream
significant-bit first.
the first bit in the stream
be the high-order bit in the first
byte, and the eighth
bit will be
the low-order bit in the first byte,
and so on.
Each 6-bit group is used as an index
characters. The character referenced
by the index
is placed in the output
string. These characters, identified
so as to be universally
representable,
characters
particular
significance
to SMTP (e.g., ".", "CR", "LF") and
to the encapsulation boundaries
Table 1: The Base64 Alphabet
Value Encoding
Value Encoding
Value Encoding
Value Encoding
The output stream (encoded bytes)
represented
no more than 76 characters each.
All line breaks
or other characters
not found in Table 1 must be ignored
data, characters other than
probably indicate
transmission
error, about
message or
rejection might
appropriate
under some circumstances.
Special processing is performed if
fewer than
the data being
encoding quantum
is always completed at the end of
bits are available in an input
group, zero bits
number of 6-bit groups. Output character
which are not required
to represent actual input
the character
Since all base64 input is an
integral number of octets,
quantum of
integral multiple
output will be
an integral multiple of 4 characters
with no "=" padding, (2) the final
quantum of encoding input
8 here, the final unit of
encoded output
characters
followed by
characters, or
quantum of encoding input is
16 here, the final unit of
encoded output will
be three characters
followed by one "=" padding character.
Care must be taken to use the proper
octets for line
encoding is applied directly to text
material that
has not been converted
particular,
converted into CRLF sequences
to base64 encoding. The important
that this may
be done directly by the encoder rather
a prior canonicalization
step in some implementations.
NOTE: There is no
encapsulation
boundaries
base64-encoded
multipart entities because
no hyphen characters are used
the base64 encoding.II7添加应用程序测试时 无法验证对路径(c:\test\WcfService)的访问
转载 & & 作者:
今天在iis7中调试程序时,提示无法验证对路径c:\test\WcfService,通过下面的方法解决了,特分享下方便需要的朋友
在II7种部署WCF服务,在“应用程序”页中点击右侧的“添加应用程序”项,添加完内容后,点击“测试设置”时报出如下异常:
解决办法:
关闭该出错的测试连接,回到上一个界面。点击“连接为...”在弹出的对话框中选择“特定用户”选择设置,输入用户名 密码。可以输入管理员账号。确定即可。
再次点击“测试设置”
您可能感兴趣的文章:
大家感兴趣的内容
12345678910
最近更新的内容
常用在线小工具}

我要回帖

更多关于 wcf 库使用 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信