小编Lui*_*cia的帖子

远程桌面"无法连接到远程计算机"

我已经按照本教程创建了第一个azure应用程序 http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_IntroToWindowsAzureLabVS2010

因为在部署之后它不能处理以下URL http://24fb8b6a055d4ab2a556218f62d6dbe1.cloudapp.net/

我发现以下链接有助于通过远程桌面连接以查看错误:http: //wely-lau.net/tag/remote-desktop/

但是,在执行所有步骤后,我收到以下错误

由于以下原因之一,远程桌面无法连接到远程计算机:

1)未启用对服务器的远程访问
2)远程计算机已关闭
3)远程计算机在网络上不可用

确保远程计算机已打开并连接到网络,并且已启用远程访问.

在:ServiceConfiguration.Cloud.cscfg

我有这个内容

<?xml version="1.0"?>
<ServiceConfiguration serviceName="GuestBook" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
  <Role name="GuestBook_WebRole">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=luisvalenciaguestbook;AccountKey=x" />
      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=luisvalenciaguestbook;AccountKey=x" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="levalencia" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="x" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2012-12-16T23:59:59.0000000+01:00" />
    </ConfigurationSettings>
    <Certificates>
      <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="x" thumbprintAlgorithm="sha1" />
    </Certificates>
  </Role>
  <Role name="GuestBook_WorkerRole">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=luisvalenciaguestbook;AccountKey=x" />
      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=luisvalenciaguestbook;AccountKey=x" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" …
Run Code Online (Sandbox Code Playgroud)

.net c# remote-desktop azure

2
推荐指数
1
解决办法
7226
查看次数

这段代码中的错误是什么?访问

在最近的一次采访中我有这个问题.

这里的错误是什么?我知道c#但我看不到错误.你能?

Class x {
     protected string t1;
     public int t2;
}
Class y : x {
}
Run Code Online (Sandbox Code Playgroud)

.net c#

2
推荐指数
1
解决办法
642
查看次数

仅为特定用户和角色启用迷你探查器

在asp.net mvc中,scott hanselman示例演示了如何显示本地环境的迷你探查器

protected void Application_BeginRequest()
        {
            if (Request.IsLocal) { MiniProfiler.Start(); } //or any number of other checks, up to you 
        }
Run Code Online (Sandbox Code Playgroud)

但是,我想更进一步,能够远程查看它,仅针对特定的登录用户或ips.

知道怎么样?

更新:我使用了以下代码:

protected void Application_EndRequest()
        {
            MiniProfiler.Stop(); //stop as early as you can, even earlier with MvcMiniProfiler.MiniProfiler.Stop(discardResults: true);
        }

        protected void Application_PostAuthorizeRequest(object sender, EventArgs e)
        {
            if (!IsAuthorizedUserForMiniProfiler(this.Context))
            {
                MiniProfiler.Stop(discardResults: true);
            }
        }

        private bool IsAuthorizedUserForMiniProfiler(HttpContext context)
        {
            if (context.User.Identity.Name.Equals("levalencia"))
                return true;
            else
                return context.User.IsInRole("Admin");
        }
Run Code Online (Sandbox Code Playgroud)

c# mvc-mini-profiler asp.net-mvc-4

2
推荐指数
1
解决办法
689
查看次数

页面不会在博客模板中工作

我已下载此模板:

http://btemplates.com/2009/blogger-template-mobipress/

xml代码太长,无法在此处发布.

我现在遇到的问题是,当我放入内容时,页面不会出现.示例:http: //idaytradeforaliving.blogspot.be/p/routines.html

我不知道我可以在这里提供哪些其他信息来帮助解决问题

我找到了这个

   <b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>

<div expr:id='&quot;summary&quot; + data:post.id'><p><data:post.body/></p></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>



                    <div class='clear'/>




<div class='singleinfo'>

        <div class='more'> <b:if cond='data:blog.pageType != &quot;static_page&quot;'><b:if 

cond='data:blog.pageType != &quot;item&quot;'>
                            <a expr:href='data:post.url'>Full Story</a>
                        </b:if></b:if></div>
</div>

</b:if> </b:if>
Run Code Online (Sandbox Code Playgroud)

html css blogger

2
推荐指数
1
解决办法
3758
查看次数

Gridview标题左对齐,在IE9上不起作用,但它适用于chrome

我有一个gridview,我想要对齐左边的标题.它适用于chrome,但在IE 9中它们没有对齐左边.

(我粘贴整个代码,以防一些包围的div负责此行为.)

截图

        <div style="height: 300px; overflow: auto">
            <asp:GridView ID="myGrid" 
                AutoGenerateColumns="true"
                runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%">
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Left"/>
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                <So![enter image description here][1]rtedAscendingHeaderStyle BackColor="#506C8C" />
                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
            </asp:GridView>
        </div>
        <div style="margin-top: 20px; margin-left: 550px">
            <asp:Button ID="btnClose" runat="server" Text="Close" />
        </div>
        <div>
            <asp:Label ID="lblError" runat="server" …
Run Code Online (Sandbox Code Playgroud)

html css asp.net gridview

2
推荐指数
1
解决办法
6649
查看次数

Visual Studio需要对此项目进行非功能性更改

我有一个视觉工作室解决方案与一个vs2010项目每次我打开它我得到这个警告.

Visual Studio需要对此项目进行非功能性更改,以使项目能够在此版本和Visual Studio 2010 SP1中打开,而不会影响项目行为.

并且它会生成一些xml日志文件

我需要肯定将它转换为vs 2012

如何在不破坏其他任何事情的情况下这样做?

visual-studio-2010 visual-studio-2012 visual-studio-2013

2
推荐指数
1
解决办法
5296
查看次数

无论订单如何,如何识别两个List <string>是否相等?

我有以下2个对象

List<string> list1
List<string> list2
Run Code Online (Sandbox Code Playgroud)

在列表1上我有3个项目在列表2上我有不同顺序的相同3个项目.

我需要一个简单的方法来返回两个列表相等,当它们包含相同的元素而不管顺序

c# linq

2
推荐指数
2
解决办法
5977
查看次数

未捕获错误:属性或字段尚未初始化

我试图在一个简单的sharepoint应用程序中运行以下代码,但我收到此错误:

Uncaught Error: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. 
Run Code Online (Sandbox Code Playgroud)

代码就是这个:

var collListItems;
$(document).ready(function () {
    getConfigValues();
});
function getConfigValues() {
    var context = SP.ClientContext.get_current();
    var configList = context.get_web().get_lists().getByTitle('Configuration Values');
    var camlQuery = new SP.CamlQuery();
    collListItems = configList.getItems(camlQuery);
    context.load(collListItems);
    context.executeQueryAsync(onGetConfigValuesSuccess, onGetConfigValuesFail);
}
function onGetConfigValuesSuccess() {
    var OrgLogoUrl;
    var OrgName;
    var listItemEnumerator = collListItems.getEnumerator();
    while (listItemEnumerator.moveNext()) {
        var oListItem = listItemEnumerator.get_current(); …
Run Code Online (Sandbox Code Playgroud)

javascript sharepoint sharepoint-apps

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

用jquery隐藏下拉列表不起作用

在Sharepoint站点中,我需要隐藏功能区上显示的下拉列表,以下代码不会抛出任何错误,但下拉列表未隐藏,我也尝试过.hide

截图:http: //screencast.com/t/c8JXLH03

我的代码:

$( document ).ready(function() {
    $("span#Ribbon.Tabs.InfoPathListTab.Views.ddViews-Medium").css('display', 'none');
});
Run Code Online (Sandbox Code Playgroud)

该元素生成的html.

<span class="ms-cui-dd" id="Ribbon.Tabs.InfoPathListTab.Views.ddViews-Medium" unselectable="on" mscui:controltype="DropDown"><span class="ms-cui-dd-text" style="width: 100px" unselectable="on"><a>Nuevo</a></span><a class="ms-cui-dd-arrow-button" id="Ribbon.Tabs.InfoPathListTab.Views.ddViews" unselectable="on" href="javascript:;" onclick="return false;" aria-haspopup="true" aria-describedby="Ribbon.Tabs.InfoPathListTab.Views.ddViews_ToolTip"><span class=" ms-cui-img-5by3 ms-cui-img-cont-float ms-cui-imageDisabled" unselectable="on"><img class="" style="top: -35px;left: -27px;" unselectable="on" src="/_layouts/15/3082/images/formatmap16x16.png?rev=23"></span><label class="ms-cui-hidden" unselectable="on">Vistas</label></a></span>
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery

2
推荐指数
1
解决办法
125
查看次数

如何在azure webjob/console应用程序上获取当前路径

我正在创建一个azure webjob(控制台应用程序),我需要获取可执行文件的当前路径.

完整的代码在这里:

   public static void ActivateFeatures(ClientContext cc)
    {
        XMLFileSystemTemplateProvider provider = new XMLFileSystemTemplateProvider(@"C:\Users\Esteban\Documents\visual studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\Template", "");

        //XMLFileSystemTemplateProvider provider = new XMLFileSystemTemplateProvider(AppDomain.CurrentDomain.BaseDirectory + @"\\Template\\", "");
        //XMLFileSystemTemplateProvider provider = new XMLFileSystemTemplateProvider(Path.Combine(Environment.GetEnvironmentVariable("WEBROOT_PATH"), "Template"), ""); 
        string templateName = "features.xml";

        // Load the template
        ProvisioningTemplate p2 = provider.GetTemplate(templateName);

        // Apply template to existing site
        try
        {
            cc.Web.ApplyProvisioningTemplate(p2);
        }
        catch (Exception ex)
        {
            System.Diagnostics.Trace.TraceError(ex.Message);
        }
        System.Diagnostics.Trace.TraceInformation("App installed finished");
    }
Run Code Online (Sandbox Code Playgroud)

我的一个朋友告诉我这条线可以在azure上工作,但是当我在本地测试它时它不起作用

XMLFileSystemTemplateProvider provider = new XMLFileSystemTemplateProvider(Path.Combine(Environment.GetEnvironmentVariable("WEBROOT_PATH"), "Template"), ""); 
Run Code Online (Sandbox Code Playgroud)

当我使用第二行时,我得到一个值不能为空的异常.

http://screencast.com/t/4tj8YelW

我只需要一行:1.我不需要硬编码2.它应该在本地工作,但也可以部署到Azure.

c# azure

2
推荐指数
1
解决办法
4011
查看次数