小编Gib*_*boK的帖子

用户'IIS APPPOOL\ASP.NET v4.0'登录失败

我有一个Web项目(C#Asp.Net,EF 4,MS SQL 2008和IIS 7),我需要在本地将它迁移到IIS 7(目前可以正常使用CASSINI).

在IIS的本地我Default Web Site有我的部署.我的部署和Default Web Site在池上的ASP.NET v4.0(查看设置图像)池目标框架4作为我的web项目. 池设置 访问该站点时,浏览器不会显示该页面,而是允许浏览器下载该页面.

我在本地IIS上运行其他项目,它们没有问题(但它们不使用实体框架).

使用事件记录器我看到如下错误:

Exception information: 
    Exception type: EntityException 
    Exception message: The underlying provider failed on Open.
   at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)


    Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
Run Code Online (Sandbox Code Playgroud)

相关问题

更新:您可以在此问题的资源中读取必须在MS …

c# asp.net iis-7 web-config

412
推荐指数
12
解决办法
38万
查看次数

Bower:ENOGIT Git未安装或未安装在PATH中

Git已安装并且在路径中.

平台:Red Hat Enterprise Linux 5.8.

>which git
/usr/local/bin/git
Run Code Online (Sandbox Code Playgroud)

然而凉亭找不到它:

bower angular#1.0.6  ENOGIT git is not installed or not in the PATH
Run Code Online (Sandbox Code Playgroud)

建议的解决方法是什么?

javascript git bower

232
推荐指数
9
解决办法
33万
查看次数

"./"(点斜杠)在HTML文件路径位置方面的含义是什么?

我知道../意味着走上一条道路,但究竟./是什么意思呢?

我最近正在阅读一个教程,它似乎只是指同一位置的文件,所以它是否有必要?如果它正在做的话,我可以不使用它吗?

html javascript path

201
推荐指数
7
解决办法
12万
查看次数

在PHP中检测浏览器语言

我使用以下PHP脚本作为我的网站的索引.

此脚本应包含特定页面,具体取决于浏览器的语言(自动检测).

此脚本不适用于所有浏览器,因此它始终包含index_en.php任何检测到的语言(问题的原因很可能是某些Accept-Language标头未被考虑的问题).

能否请您建议一个更强大的解决方案?

<?php
// Open session var
session_start();
// views: 1 = first visit; >1 = second visit

// Detect language from user agent browser
function lixlpixel_get_env_var($Var)
{
     if(empty($GLOBALS[$Var]))
     {
         $GLOBALS[$Var]=(!empty($GLOBALS['_SERVER'][$Var]))?
         $GLOBALS['_SERVER'][$Var] : (!empty($GLOBALS['HTTP_SERVER_VARS'][$Var])) ? $GLOBALS['HTTP_SERVER_VARS'][$Var]:'';
     }
}

function lixlpixel_detect_lang()
{
     // Detect HTTP_ACCEPT_LANGUAGE & HTTP_USER_AGENT.
     lixlpixel_get_env_var('HTTP_ACCEPT_LANGUAGE');
     lixlpixel_get_env_var('HTTP_USER_AGENT');

     $_AL=strtolower($GLOBALS['HTTP_ACCEPT_LANGUAGE']);
     $_UA=strtolower($GLOBALS['HTTP_USER_AGENT']);

     // Try to detect Primary language if several languages are accepted.
     foreach($GLOBALS['_LANG'] as $K)
     {
         if(strpos($_AL, $K)===0)
         return $K;
     }

     // Try to detect any language …
Run Code Online (Sandbox Code Playgroud)

php cross-browser browser-detection

141
推荐指数
7
解决办法
23万
查看次数

XPath:从子节点获取父节点

我需要获取子节点"标题50"的父节点

目前我只使用

//*[title="50"]
Run Code Online (Sandbox Code Playgroud)

我怎么能得到它的父母?结果应该是store节点.


<?xml version="1.0" encoding="utf-8"?>
<d:data xmlns:d="defiant-namespace" d:mi="23">
    <store d:mi="22">
        <book price="12.99" d:price="Number" d:mi="4">
            <title d:constr="String" d:mi="1">Sword of Honour</title>
            <category d:constr="String" d:mi="2">fiction</category>
            <author d:constr="String" d:mi="3">Evelyn Waugh</author>
        </book>
        <book price="8.99" d:price="Number" d:mi="9">
            <title d:constr="String" d:mi="5">Moby Dick</title>
            <category d:constr="String" d:mi="6">fiction</category>
            <author d:constr="String" d:mi="7">Herman Melville</author>
            <isbn d:constr="String" d:mi="8">0-553-21311-3</isbn>
        </book>
        <book price="8.95" d:price="Number" d:mi="13">
            <title d:constr="String" d:mi="10">50</title>
            <category d:constr="String" d:mi="11">reference</category>
            <author d:constr="String" d:mi="12">Nigel Rees</author>
        </book>
        <book price="22.99" d:price="Number" d:mi="18">
            <title d:constr="String" d:mi="14">The Lord of the Rings</title>
            <category d:constr="String" d:mi="15">fiction</category>
            <author …
Run Code Online (Sandbox Code Playgroud)

xml xpath

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

LINQ to Entities不支持指定的类型成员"Date".仅初始化程序,实体成员和实体导航属性

Entity Framework中使用此代码我收到以下错误.我需要获取特定日期的所有行,采用DateTimeStart此格式的DataType类型2013-01-30 12:00:00.000

码:

 var eventsCustom = eventCustomRepository.FindAllEventsCustomByUniqueStudentReference(userDevice.UniqueStudentReference)
                    .Where(x =>  x.DateTimeStart.Date == currentDateTime.Date);
Run Code Online (Sandbox Code Playgroud)

错误:

base {System.SystemException} = {"The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported."}
Run Code Online (Sandbox Code Playgroud)

任何想法如何解决它?

linq linq-to-entities entity-framework-4

124
推荐指数
7
解决办法
9万
查看次数

隐藏iframe上的水平滚动条?

我需要使用css,jquery或js隐藏iframe上的水平scollbar.

html iframe scrollbar hide

110
推荐指数
3
解决办法
29万
查看次数

JavaScript有"短路"评估吗?

可能重复:
使用&&的短路作为if语句?
javascript是否在布尔表达式中使用优化?

我想知道是否__CODE__"短路"评估,如C#中的&& Operator.如果不是,我想知道是否有采用合理的解决方法.

javascript short-circuiting

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

字段初始值设定项不能引用非静态字段,方法或属性

我有一个类,当我尝试在另一个类中使用它时,我收到下面的错误.

using System;
using System.Collections.Generic;
using System.Linq;

namespace MySite
{
    public class Reminders
    {
        public Dictionary<TimeSpan, string> TimeSpanText { get; set; }

        // We are setting the default values using the Costructor
        public Reminders()
        {
            TimeSpanText.Add(TimeSpan.Zero, "None");
            TimeSpanText.Add(new TimeSpan(0, 0, 5, 0), "5 minutes before");
            TimeSpanText.Add(new TimeSpan(0, 0, 15, 0), "15 minutes before");
            TimeSpanText.Add(new TimeSpan(0, 0, 30, 0), "30 minutes before");
            TimeSpanText.Add(new TimeSpan(0, 1, 0, 0), "1 hour before");
            TimeSpanText.Add(new TimeSpan(0, 2, 0, 0), "2 hours before");
            TimeSpanText.Add(new TimeSpan(1, 0, …
Run Code Online (Sandbox Code Playgroud)

c#

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

重置子元素的不透明度 - Maple Browser(Samsung TV App)

我在创建具有子元素的透明元素时遇到问题.使用此代码,子元素从父元素获取不透明度值.

我需要将子元素的不透明度重置/设置为任意值.浏览器参考是Maple Browser (for a Samsung TV Application).

 .video-caption {
        position: absolute;
        top:50px;
        width: 180px;
        height: 55px;
        background-color: #000;
        -khtml-opacity:.40; 
        -moz-opacity:.40; 
        -ms-filter:"alpha(opacity=40)";
        filter:alpha(opacity=40);
        filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.4); /*just for testing*/
        opacity:.40; 
    }
    .video-caption > p {
        color: #fff !important;
        font-size: 18px;
        -khtml-opacity:1; 
        -moz-opacity:1; 
        -ms-filter:"alpha(opacity=100)";
        filter:alpha(opacity=100);
        filter: progid:DXImageTransform.Microsoft.Alpha(opacity=1);
        opacity:1; 
    }
Run Code Online (Sandbox Code Playgroud)

编辑标记

<div> <img id="videothb-1" src="https://xxxxx/splash.jpg"> <div class="video-caption"> <p>Description here</p> </div> </div>
Run Code Online (Sandbox Code Playgroud)

javascript css samsung-smart-tv smart-tv

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