小编Jon*_*han的帖子

在IIS 8.5上部署WCF

我试图在IIS 8.5上部署IIS服务应用程序,但每次我尝试连接到服务时,http://localhost/test/WCFService.svc我都会看到以下屏幕:

在此输入图像描述

当我去的时候,turn Windows features On or OFF我有以下几点:

在此输入图像描述

我的web.config看起来如下:

<?xml version="1.0"?>
<configuration>

  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name ="MessageServaceBehavior">
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information …
Run Code Online (Sandbox Code Playgroud)

wcf web-config windows-8.1 iis-8.5

8
推荐指数
1
解决办法
8786
查看次数

在Windows Azure上部署WCF服务

只是为了澄清我是第一次用azure工作.几个月前我用SQL Server连接创建了一个Restful WCF服务.我在IIS上使用SQL Server Express 2012上的数据库部署了WCF.该服务没有任何问题.

[OperationContract]
[WebGet(UriTemplate = "feed/{ID}/{Rating}/{Feed}", ResponseFormat = WebMessageFormat.Json)]
string feed(string ID, string Rating, string Feed);
Run Code Online (Sandbox Code Playgroud)

现在我必须将WCF服务移动到Azure.问题是我不知道如何将WCF部署到azure,如果甚至可以将WCF部署到azure.数据库已移至azure.

.net c# rest wcf azure

4
推荐指数
1
解决办法
1万
查看次数

在onCreateView之外使用android Inflate

我有一个片段.在我的On create中,我按照以下方式设置了我的inflater.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    v= inflater.inflate(R.layout.dashboard_two, container, false);  
    getActivity().getActionBar().setTitle("NV Technologies");
    new HttpRequestFaultList().execute();
    return v;
}   
Run Code Online (Sandbox Code Playgroud)

我想更改inflater ti显示在onCreate视图之外的不同布局.我试过了:

v= inflater.inflate(R.layout.custom_dash, container, false);
Run Code Online (Sandbox Code Playgroud)

custom_dash.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:id="@+id/testFrag"
  android:layout_height="match_parent"
  android:orientation="vertical" >

   <ImageView
      android:id="@+id/imageView1"
      android:layout_width="269dp"
      android:layout_height="387dp"
      android:layout_gravity="center"
      android:scaleType="centerInside"
      android:src="@drawable/message" />

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

但因为它不在onCreate中,所以不存在inflater或容器.我想在catch块中更改Layout,如果有catch,则Layout必须更改.甚至可以在片段中更改布局但在onCreate方法之外?如何

android android-layout android-inflate android-fragments

3
推荐指数
1
解决办法
3803
查看次数