|
I've got web project that includes native win32 DLL resided in bin folder and unsafe web page that accesses functions from that DLL. In web.config /unsafe compilation is also enabled. On my PC it runs normally but when I put it to http on 3rd party web hosting it returns that error:
What is the reason and solution?
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.Security.Policy.PolicyException: Required permissions cannot be acquired.
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:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7604211
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57
[FileLoadException: Could not load file or assembly 'Sample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly 'Sample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +227
System.Web.Compilation.BuildManager.CompileGlobalAsax() +52
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337
[HttpException (0x80004005): Could not load file or assembly 'Sample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729
[HttpException (0x80004005): Could not load file or assembly 'Sample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
Чесноков
|
|
|
|
|
If it's not a deployment issue, then it's an issue with permissions on your web host. Talk to them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
It is certainly not.
ASP.NET dll has a native dll in its <Module> section. I presume that is the reason server fails to load it.
Do you know any web hosters who allows native dll support by default?
Чесноков
|
|
|
|
|
I went to the msdn website:http://msdn.microsoft.com/en-us/library/system.net.networkinformation.aspx
looking for help writing the code in VB.
|
|
|
|
|
i'm retriving this value from database
12+(IIf( 0>0, 0, 0))+34
How to eval this value
|
|
|
|
|
what is your question ? How does it relate to ASP.NET ? While this is a little weird looking, it's just 12 + 34. Unless there's something you're not telling us.
What are you getting from the DB and how/where do you want to evaluate it ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
OK, so the DB has nothing to do with it. You want to write Excel in a website ? Then you need to write a parsing engine.
Your easiest bet, if you want to use the same formulas as Excel, is to use Excel on the back end to parse these things.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Well, if you can't work out how to use Excel to parse it, then I doubt you'll work out how to write a parsing engine, which is a ton more work.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
That IIf condition will give you always value zero so your result will be 12+34=46
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I 5d you. This moron asked a vague question, didn't mean quite what he was saying, and is 1 voting us for not doing his work for him.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Some people really don't deserve help,and they become ignorant only bcause they don't know how to ask a quesion and they are not able to explain it.
That makes no sense if he/she voted our answers by 1,but whatever this forum is dedicated for helping each-other and nobody can't valuation with bad votes to expreienced and excellent CP (CodeProject) users like you.
Regards.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
rjayaabharathi@gmail.com wrote: i'm retriving this value from database
12+(IIf( 0>0, 0, 0))+34
How to eval this value
I see you're deleting all your posts. Perhaps instead you could try posting your actual code, and asking more specific questions, so we can work out what you've tried, and where you're going wrong. People who ask vague questions, and then delete their posts because we can't read their minds and do their jobs for them, really get up my nose.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i have fill my gridview with a query having join condition for two tables now i want to update that record using edittemplate how do i so?
|
|
|
|
|
I suspect you need to write SQL to update your tables.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i write sql query but how i bind it.
<%Bind("Student.Rollno")%> it doesnot work. it show error that Student is not recognized in this context
|
|
|
|
|
You shouldn't have to specify the table, you'd bind to the table that's returned, not tables in the DB.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
what should be the bindig code?
|
|
|
|
|
Whenever I do this sort of thing, I write my own SQL, I never use the retarded, unprofessional auto data source stuff in ASP.NET. Having said that, I get a source containing the data I need, from however many tables, and I bind to the properties of a struct, or the columns of the table. Just the name of the column or property.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
www.dominion-web.com/applications/flvconverter/
i hve downloaded from this url . can u please help me how to use the dll in my
website using .net
|
|
|
|
|
It seems you need to read a REALLY basic book. You add a reference to a dll to your project.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
In .net u can see the option Project in menu....in that u just need to do add Reference.....
project -> Add reference
ok....
|
|
|
|
|
how to convert the below coding into vbasp.net code?
TextBox eno=(TextBox)e.Item.FindControl("TextBox1");
|
|
|
|
|
There are online converters you could use. I don't know how to do the cast, but I'd expect the rest to work just by dropping the semicolon. If you read the MSDN on the FindControl method, that would probably have examples in VB.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|