NOVINKA! E-learningové kurzy umělé inteligence. Nyní AI za nejlepší ceny. Zjisti více:
NOVINKA – Víkendový online kurz Software tester, který tě posune dál. Zjisti, jak na to!
Avatar
Maros2470
Člen
Avatar
Maros2470:9.4.2015 10:28

Zdravím. Poprvé zkouším publikovat aplikaci na aspone.cz. Po spuštění stránek se mi zobrazí tato výjimka. Můžete mi poradit co s tím?

Server Error in '/' Application.

Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLo­adException: Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[TypeLoadException: Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
Microsoft.AspNet­.Identity.Role­Manager`2.Role­ExistsAsync(String roleName) +0
Microsoft.AspNet­.Identity.<>c__Dis­playClass10`2­.<RoleExists>b__f() +18
Microsoft.AspNet­.Identity.<>c__Dis­playClass1`1.<Run­Sync>b__0() +50
System.Threadin­g.Tasks.Task`1­.InnerInvoke() +60
System.Threadin­g.Tasks.Task.E­xecute() +45
System.Runtime­.CompilerServi­ces.TaskAwaiter­.ThrowForNonSuc­cess(Task task) +93
System.Runtime­.CompilerServi­ces.TaskAwaiter­.HandleNonSuc­cessAndDebugger­Notification(Task task) +52
Microsoft.AspNet­.Identity.Asyn­cHelper.RunSyn­c(Func`1 func) +166
Microsoft.AspNet­.Identity.Role­ManagerExtensi­ons.RoleExists(Ro­leManager`2 manager, String roleName) +104
Spotrebice.Spo­trebice.Spotre­biceRole.crea­teSpotr() in g:\C#\Programo­vání\2013\WF\S­potrebice\Spo­trebice\Spotre­bice\Spotrebi­ceRole.cs:32
Spotrebice.Glo­bal.Applicati­on_Start(Object sender, EventArgs e) in g:\C#\Programo­vání\2013\WF\S­potrebice\Spo­trebice\Global­.asax.cs:26

[HttpException (0x80004005): Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
System.Web.HttpAp­plicationFacto­ry.EnsureAppStar­tCalledForInte­gratedMode(HttpCon­text context, HttpApplication app) +9936761
System.Web.HttpAp­plication.Regis­terEventSubscrip­tionsWithIIS(In­tPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpAp­plication.Init­Special(HttpAp­plicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpAp­plicationFacto­ry.GetSpecialAp­plicationInstan­ce(IntPtr appContext, HttpContext context) +336
System.Web.Hos­ting.Pipeline­Runtime.Initi­alizeApplicati­on(IntPtr appContext) +296

[HttpException (0x80004005): Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
System.Web.HttpRun­time.FirstRequ­estInit(HttpCon­text context) +9915300
System.Web.HttpRun­time.EnsureFir­stRequestInit(HttpCon­text context) +101
System.Web.HttpRun­time.ProcessRe­questNotifica­tionPrivate(I­IS7WorkerRequ­est wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319­.18449

 
Odpovědět
9.4.2015 10:28
Avatar
Odpovídá na Maros2470
Michal Štěpánek:9.4.2015 22:33

při jaké činnosti se ta chyba objevila?

Nahoru Odpovědět
9.4.2015 22:33
Nikdy neříkej nahlas, že to nejde. Vždycky se totiž najde blbec, který to neví a udělá to...
Avatar
Maros2470
Člen
Avatar
Odpovídá na Michal Štěpánek
Maros2470:10.4.2015 6:19

Při spuštění stránek

 
Nahoru Odpovědět
10.4.2015 6:19
Avatar
Maros2470
Člen
Avatar
Odpovídá na Michal Štěpánek
Maros2470:10.4.2015 6:33

Při spuštění na testovacím serveru to běhá normálně

 
Nahoru Odpovědět
10.4.2015 6:33
Avatar
Michal Štěpánek:10.4.2015 8:19

Nemáš tam někde uvedenou cestu někam "natvrdo" místo relativní cesty?
...
Spotrebice.Spo­trebice.Spotre­biceRole.crea­teSpotr() in g:\C#\Programo­vání\2013\WF\S­potrebice\Spo­trebice\Spotre­bice\Spotrebi­ceRole.cs:32
Spotrebice.Glo­bal.Applicati­on_Start(Object sender, EventArgs e) in g:\C#\Programo­vání\2013\WF\S­potrebice\Spo­trebice\Global­.asax.cs:26

Nahoru Odpovědět
10.4.2015 8:19
Nikdy neříkej nahlas, že to nejde. Vždycky se totiž najde blbec, který to neví a udělá to...
Avatar
Maros2470
Člen
Avatar
Odpovídá na Michal Štěpánek
Maros2470:10.4.2015 8:32

Už se ta vyjímka trochu změnila, ale jsem z toho jelen.

Server Error in '/' Application.

Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLo­adException: Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[TypeLoadException: Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
Microsoft.AspNet­.Identity.Role­Manager`2.Role­ExistsAsync(String roleName) +0
Microsoft.AspNet­.Identity.<>c__Dis­playClass10`2­.<RoleExists>b__f() +18
Microsoft.AspNet­.Identity.<>c__Dis­playClass1`1.<Run­Sync>b__0() +50
System.Threadin­g.Tasks.Task`1­.InnerInvoke() +60
System.Threadin­g.Tasks.Task.E­xecute() +45
System.Runtime­.CompilerServi­ces.TaskAwaiter­.ThrowForNonSuc­cess(Task task) +93
System.Runtime­.CompilerServi­ces.TaskAwaiter­.HandleNonSuc­cessAndDebugger­Notification(Task task) +52
Microsoft.AspNet­.Identity.Asyn­cHelper.RunSyn­c(Func`1 func) +166
Microsoft.AspNet­.Identity.Role­ManagerExtensi­ons.RoleExists(Ro­leManager`2 manager, String roleName) +104
Spotrebice.Spo­trebice.Spotre­biceRole.crea­teSpotr() +115
Spotrebice.Glo­bal.Applicati­on_Start(Object sender, EventArgs e) +47

[HttpException (0x80004005): Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
System.Web.HttpAp­plicationFacto­ry.EnsureAppStar­tCalledForInte­gratedMode(HttpCon­text context, HttpApplication app) +9936761
System.Web.HttpAp­plication.Regis­terEventSubscrip­tionsWithIIS(In­tPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpAp­plication.Init­Special(HttpAp­plicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpAp­plicationFacto­ry.GetSpecialAp­plicationInstan­ce(IntPtr appContext, HttpContext context) +336
System.Web.Hos­ting.Pipeline­Runtime.Initi­alizeApplicati­on(IntPtr appContext) +296

[HttpException (0x80004005): Inheritance security rules violated while overriding member: 'Microsoft.As­pNet.Identity­.TaskExtension­s+CultureAwai­ter`1<T>.Unsa­feOnCompleted(Sys­tem.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.]
System.Web.HttpRun­time.FirstRequ­estInit(HttpCon­text context) +9915300
System.Web.HttpRun­time.EnsureFir­stRequestInit(HttpCon­text context) +101
System.Web.HttpRun­time.ProcessRe­questNotifica­tionPrivate(I­IS7WorkerRequ­est wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319­.18449

 
Nahoru Odpovědět
10.4.2015 8:32
Avatar
Odpovídá na Maros2470
Michal Štěpánek:10.4.2015 8:36

Taky z toho moc moudrej nejsem, ale je tam spousta záznamů o Microsoft.AspNet­.Identity, tak jestli nebude problém někde kolem ověřování uživatele...

Nahoru Odpovědět
10.4.2015 8:36
Nikdy neříkej nahlas, že to nejde. Vždycky se totiž najde blbec, který to neví a udělá to...
Avatar
Maros2470
Člen
Avatar
Odpovídá na Michal Štěpánek
Maros2470:10.4.2015 15:45

Na aspone.cz mi nastavili vyšší práva. Teď už je problém asi jen s connectionString. Vyjímka teď vypadá takto:

Server Error in '/' Application.

The system cannot find the file specified

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Componen­tModel.Win32Ex­ception: The system cannot find the file specified

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Win32Exception (0x80004005): The system cannot find the file specified]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
System.Data.SqlCli­ent.SqlInternal­Connection.OnE­rror(SqlExcep­tion exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6749670
System.Data.SqlCli­ent.TdsParser­.ThrowExcepti­onAndWarning(TdsPar­serStateObject stateObj, Boolean callerHasConnec­tionLock, Boolean asyncClose) +815
System.Data.SqlCli­ent.TdsParser­.Connect(Serve­rInfo serverInfo, SqlInternalCon­nectionTds connHandler, Boolean ignoreSniOpen­Timeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) +6775368
System.Data.SqlCli­ent.SqlInternal­ConnectionTds­.AttemptOneLo­gin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpen­Timeout, TimeoutTimer timeout, Boolean withFailover) +219
System.Data.SqlCli­ent.SqlInternal­ConnectionTds­.LoginNoFailo­ver(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUse­rInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +6777796
System.Data.SqlCli­ent.SqlInternal­ConnectionTds­.OpenLoginEnlis­t(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUse­rInstance) +6778255
System.Data.SqlCli­ent.SqlInternal­ConnectionTds­..ctor(DbConnec­tionPoolIdenti­ty identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUse­rInstance, SqlConnectionString userConnectio­nOptions, SessionData reconnectSessi­onData) +878
System.Data.SqlCli­ent.SqlConnec­tionFactory.Cre­ateConnection(DbCon­nectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProvi­derInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +1162
System.Data.Pro­viderBase.DbCon­nectionFactory­.CreatePooled­Connection(DbCon­nectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +72
System.Data.Pro­viderBase.DbCon­nectionPool.Cre­ateObject(DbCon­nection owningObject, DbConnectionOptions userOptions, DbConnectionIn­ternal oldConnection) +6781425
System.Data.Pro­viderBase.DbCon­nectionPool.U­serCreateRequ­est(DbConnecti­on owningObject, DbConnectionOptions userOptions, DbConnectionIn­ternal oldConnection) +103
System.Data.Pro­viderBase.DbCon­nectionPool.Try­GetConnection(DbCon­nection owningObject, UInt32 waitForMultiple­ObjectsTimeou­t, Boolean allowCreate, Boolean onlyOneCheckCon­nection, DbConnectionOptions userOptions, DbConnectionIn­ternal& connection) +2105
System.Data.Pro­viderBase.DbCon­nectionPool.Try­GetConnection(DbCon­nection owningObject, TaskCompletion­Source`1 retry, DbConnectionOptions userOptions, DbConnectionIn­ternal& connection) +116
System.Data.Pro­viderBase.DbCon­nectionFactory­.TryGetConnec­tion(DbConnec­tion owningConnection, TaskCompletion­Source`1 retry, DbConnectionOptions userOptions, DbConnectionIn­ternal oldConnection, DbConnectionIn­ternal& connection) +1089
System.Data.Pro­viderBase.DbCon­nectionInternal­.TryOpenConnec­tionInternal(DbCon­nection outerConnection, DbConnectionFactory connectionFactory, TaskCompletion­Source`1 retry, DbConnectionOptions userOptions) +6785863
System.Data.SqlCli­ent.SqlConnec­tion.TryOpenIn­ner(TaskComple­tionSource`1 retry) +233
System.Data.SqlCli­ent.SqlConnec­tion.TryOpen(Tas­kCompletionSou­rce`1 retry) +278
System.Data.SqlCli­ent.SqlConnec­tion.Open() +239
System.Data.En­tity.Infrastruc­ture.Intercep­tion.Internal­Dispatcher1.Dispatch(TTarget target, Action2 operation, TInterception­Context interceptionCon­text, Action3 executing, Action3 executed) +207
System.Data.En­tity.Infrastruc­ture.Intercep­tion.DbConnec­tionDispatcher­.Open(DbConnec­tion connection, DbInterception­Context interceptionCon­text) +438
System.Data.En­tity.SqlServer­.<>c__Display­Class1.<Execu­te>b__0() +15
System.Data.En­tity.SqlServer­.DefaultSqlExe­cutionStrategy­.Execute(Func`1 operation) +263
System.Data.En­tity.SqlServer­.SqlProviderSer­vices.UsingCon­nection(DbCon­nection sqlConnection, Action`1 act) +391
System.Data.En­tity.SqlServer­.SqlProviderSer­vices.UsingMas­terConnection(DbCon­nection sqlConnection, Action`1 act) +749
System.Data.En­tity.SqlServer­.SqlProviderSer­vices.DbCreate­Database(DbCon­nection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollec­tion) +314
System.Data.En­tity.Migration­s.Utilities.Da­tabaseCreator­.Create(DbCon­nection connection) +281
System.Data.En­tity.Migration­s.DbMigrator.En­sureDatabaseE­xists(Action mustSucceedTo­KeepDatabase) +230
System.Data.En­tity.Internal­.DatabaseCrea­tor.CreateData­base(Internal­Context internalContext, Func`3 createMigrator, ObjectContext objectContext) +130
System.Data.En­tity.Database­.Create(Databa­seExistenceSta­te existenceState) +267
System.Data.En­tity.CreateDa­tabaseIfNotExis­ts`1.Initiali­zeDatabase(TCon­text context) +243
System.Data.En­tity.Internal­.InternalContex­t.PerformIniti­alizationActi­on(Action action) +66
System.Data.En­tity.Internal­.InternalContex­t.PerformData­baseInitializa­tion() +596
System.Data.En­tity.Internal­.RetryAction`1­.PerformAction(TIn­put input) +208
System.Data.En­tity.Internal­.LazyInternal­Context.Initi­alizeDatabase­Action(Action`1 action) +266
System.Data.En­tity.Internal­.InternalContex­t.GetEntitySe­tAndBaseTypeFor­Type(Type entityType) +39
System.Data.En­tity.Internal­.Linq.Internal­Set`1.Initiali­ze() +72
System.Data.En­tity.Internal­.Linq.Internal­Set`1.get_Inter­nalContext() +21
System.Data.En­tity.Infrastruc­ture.DbQuery`1­.System.Linq.I­Queryable.get_Pro­vider() +64
System.Data.En­tity.Queryable­Extensions.Fir­stOrDefaultAsyn­c(IQueryable1 source, Expression1 predicate, CancellationToken cancellationToken) +218
System.Data.En­tity.Queryable­Extensions.Fir­stOrDefaultAsyn­c(IQueryable1 source, Expression1 predicate) +113
Microsoft.AspNet­.Identity.<Fin­dByNameAsync>d__13­.MoveNext() +229
System.Runtime­.CompilerServi­ces.TaskAwaiter­.ThrowForNonSuc­cess(Task task) +144
System.Runtime­.CompilerServi­ces.TaskAwaiter­.HandleNonSuc­cessAndDebugger­Notification(Task task) +84
Microsoft.AspNet­.Identity.<Ro­leExistsAsync>d__d­.MoveNext() +455
System.Runtime­.CompilerServi­ces.TaskAwaiter­.ThrowForNonSuc­cess(Task task) +144
System.Runtime­.CompilerServi­ces.TaskAwaiter­.HandleNonSuc­cessAndDebugger­Notification(Task task) +84
System.Runtime­.CompilerServi­ces.TaskAwaiter`1­.GetResult() +49
Microsoft.AspNet­.Identity.Asyn­cHelper.RunSyn­c(Func`1 func) +235
Spotrebice.Spo­trebice.Spotre­biceRole.crea­teSpotr() +127

[HttpException (0x80004005): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
System.Web.HttpAp­plicationFacto­ry.EnsureAppStar­tCalledForInte­gratedMode(HttpCon­text context, HttpApplication app) +12951237
System.Web.HttpAp­plication.Regis­terEventSubscrip­tionsWithIIS(In­tPtr appContext, HttpContext context, MethodInfo[] handlers) +175
System.Web.HttpAp­plication.Init­Special(HttpAp­plicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpAp­plicationFacto­ry.GetSpecialAp­plicationInstan­ce(IntPtr appContext, HttpContext context) +404
System.Web.Hos­ting.Pipeline­Runtime.Initi­alizeApplicati­on(IntPtr appContext) +475

[HttpException (0x80004005): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
System.Web.HttpRun­time.FirstRequ­estInit(HttpCon­text context) +12968244
System.Web.HttpRun­time.EnsureFir­stRequestInit(HttpCon­text context) +159
System.Web.HttpRun­time.ProcessRe­questNotifica­tionPrivate(I­IS7WorkerRequ­est wr, HttpContext context) +12807949

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319­.18449

 
Nahoru Odpovědět
10.4.2015 15:45
Avatar
Ľuboš Čurgó
Tvůrce
Avatar
Odpovídá na Maros2470
Ľuboš Čurgó:10.4.2015 19:16

Skus pridat do webconfigu <trust level="Full" />

 
Nahoru Odpovědět
10.4.2015 19:16
Avatar
Odpovídá na Maros2470
Michal Štěpánek:10.4.2015 19:33

Napiš, jaký máš ConnectionString. DB jsi na aspone nahrál? Pokud ji máš jen jako soubor v App_Data, myslím, že zrovna na aspone to s tím nechodí, že musí být extra databáze...

Nahoru Odpovědět
10.4.2015 19:33
Nikdy neříkej nahlas, že to nejde. Vždycky se totiž najde blbec, který to neví a udělá to...
Avatar
Maros2470
Člen
Avatar
Odpovídá na Ľuboš Čurgó
Maros2470:10.4.2015 19:59

Stále problémy. Zkusil bych vytvořit databázi přímo na tom serveru, kde bude aplikace. Můžeš mi poradit jak již hotovou databázi mdf nascriptovat? Pak bych jí zkusil natáhnout na server. ConnectionString se mi tam vygeneroval. Jen nevím jestli to bude fungovat s Entity

 
Nahoru Odpovědět
10.4.2015 19:59
Avatar
Maros2470
Člen
Avatar
Odpovídá na Michal Štěpánek
Maros2470:10.4.2015 20:00
<connectionStrings>
    <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-Spotrebice-20140927072246.mdf;Initial Catalog=aspnet-Spotrebice-20140927072246;Integrated Security=True"
      providerName="System.Data.SqlClient" />
    <add name="SpotrebiceEntities" connectionString="metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(LocalDB)\v11.0;attachdbfilename=|DataDirectory|\Spotrebice.mdf;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;"
      providerName="System.Data.EntityClient" />
    <add name="ConnectionString" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Spotrebice.mdf;Integrated Security=True;Connect Timeout=30"
      providerName="System.Data.SqlClient" />
    <add name="ConnectionString2" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\SpravaDat.mdf;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
Editováno 10.4.2015 20:00
 
Nahoru Odpovědět
10.4.2015 20:00
Avatar
Maros2470
Člen
Avatar
Odpovídá na Michal Štěpánek
Maros2470:10.4.2015 20:02

Nevím jak tam tu databázi nahrát. Je jen v app_data. Dělám to poprvé a na aspone fóru jsem taky z toho nebyl moudrý

 
Nahoru Odpovědět
10.4.2015 20:02
Avatar
Maros2470
Člen
Avatar
Odpovídá na Maros2470
Maros2470:10.4.2015 22:58

Vytvořil jsem databázi ručně. Teď to celkem chodí, ale mám zase problém s importem dat z excelu:

Server Error in '/' Application.

Could not find a part of the path 'D:\Websites\f1a0cce7­f0\www\ImportDo­cument\758c35e1-4054-4fd5-9ff9-68c4b7b90868.xlsx'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.Direc­toryNotFoundEx­ception: Could not find a part of the path 'D:\Websites\f1a0cce7­f0\www\ImportDo­cument\758c35e1-4054-4fd5-9ff9-68c4b7b90868.xlsx'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[DirectoryNot­FoundException: Could not find a part of the path 'D:\Websites\f1a0cce7­f0\www\ImportDo­cument\758c35e1-4054-4fd5-9ff9-68c4b7b90868.xlsx'­.]
System.IO.__E­rror.WinIOError(In­t32 errorCode, String maybeFullPath) +338
System.IO.FileS­tream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +1430
System.IO.FileS­tream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +208
System.IO.FileS­tream..ctor(String path, FileMode mode) +91
System.Web.HttpPos­tedFile.SaveAs(String filename) +160
Spotrebice.Ad­min.ImportExcel­.btnImportCSV_Clic­k(Object sender, EventArgs e) +366
System.Web.UI­.WebControls.But­ton.RaisePostBac­kEvent(String eventArgument) +155
System.Web.UI­.Page.ProcessRe­questMain(Boo­lean includeStages­BeforeAsyncPo­int, Boolean includeStagesAf­terAsyncPoint) +3804

 
Nahoru Odpovědět
10.4.2015 22:58
Avatar
Maros2470
Člen
Avatar
Odpovídá na Michal Štěpánek
Maros2470:11.4.2015 0:20

Snad už to běží. Teď už mám jen jeden problém:
The 'Microsoft.ACE­.OLEDB.12.0' provider is not registered on the local machine.

 
Nahoru Odpovědět
11.4.2015 0:20
Avatar
Andrej Farkaš:11.4.2015 0:34

Na aspone.cz funguje aj mdf v App_Data.
Toto som našiel v maili, kde som to s nimi riešil.

<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NAZEVDB.mdf;Integrated Security=True;User Instance=True;Database=nazev" providerName="System.Data.SqlClient" />
Nahoru Odpovědět
11.4.2015 0:34
Live. Love. Learn.
Avatar
Maros2470
Člen
Avatar
Odpovídá na Andrej Farkaš
Maros2470:11.4.2015 0:49

Tohle mi, ale nefungovalo. Nevíš náhodou co s tímhle?

The 'Microsoft.ACE­.OLEDB.12.0' provider is not registered on the local machine.

 
Nahoru Odpovědět
11.4.2015 0:49
Avatar
Andrej Farkaš:11.4.2015 7:00

Používaš tú knižnicu na otázky prácu s excelom a na tom serveri zrejme nie je (aj keď to by asi chyba vyzerala inak) alebo toto:
www.codeproject.com/…e-Local-Mach
Alebo treba v IIS povoliť 32 bitové aplikácie, v prípade, že je tam 64 bit.
Možností je veľa.

Nahoru Odpovědět
11.4.2015 7:00
Live. Love. Learn.
Avatar
Ľuboš Čurgó
Tvůrce
Avatar
Odpovídá na Maros2470
Ľuboš Čurgó:11.4.2015 16:00

Databazu vies preniest tak, ze v SQL Managment studiu si nechas vygenerovat create script nad databazou ktory potom spustis v administracnom prostredi aspone.

 
Nahoru Odpovědět
11.4.2015 16:00
Děláme co je v našich silách, aby byly zdejší diskuze co nejkvalitnější. Proto do nich také mohou přispívat pouze registrovaní členové. Pro zapojení do diskuze se přihlas. Pokud ještě nemáš účet, zaregistruj se, je to zdarma.

Zobrazeno 19 zpráv z 19.