asp.net-4.0

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error in windows server

假如想象 提交于 2020-01-05 05:46:10
问题 I am using a excel reader to read contents from the excel, string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + filePath + ";Extended Properties=Excel 12.0;"; System.Data.OleDb.OleDbConnection ExcelConnection = new System.Data.OleDb.OleDbConnection(connectionString); I'm working in VS2010 on a windows 7 ultimate x64 installation. it works fine in my local machine when I run with VS. When I upload the website in server I get the following error. What should I do here,

Unobtrusive Oracle Deployment on Windows Server 2008

别说谁变了你拦得住时间么 提交于 2020-01-04 11:47:06
问题 I have a .NET 4.0 Web Forms app that I am running with the beta Oracle EF-aware data provider, and I want to perform "unobtrusive" Oracle deployment to a Win2K8 box, as shown in many SO solutions. There is an existing Oracle Instant Client installation on the Win2K8 box, which I can neither work with nor remove, and it has an entry in the PATH environment variable on the Win2K8 box. According to this SO answer, I do not need to set PATH for my Oracle DLLs, since I have DllPath set in the web

Unobtrusive Oracle Deployment on Windows Server 2008

三世轮回 提交于 2020-01-04 11:46:09
问题 I have a .NET 4.0 Web Forms app that I am running with the beta Oracle EF-aware data provider, and I want to perform "unobtrusive" Oracle deployment to a Win2K8 box, as shown in many SO solutions. There is an existing Oracle Instant Client installation on the Win2K8 box, which I can neither work with nor remove, and it has an entry in the PATH environment variable on the Win2K8 box. According to this SO answer, I do not need to set PATH for my Oracle DLLs, since I have DllPath set in the web

Unobtrusive Oracle Deployment on Windows Server 2008

房东的猫 提交于 2020-01-04 11:44:47
问题 I have a .NET 4.0 Web Forms app that I am running with the beta Oracle EF-aware data provider, and I want to perform "unobtrusive" Oracle deployment to a Win2K8 box, as shown in many SO solutions. There is an existing Oracle Instant Client installation on the Win2K8 box, which I can neither work with nor remove, and it has an entry in the PATH environment variable on the Win2K8 box. According to this SO answer, I do not need to set PATH for my Oracle DLLs, since I have DllPath set in the web

How do I make assembly redirection work in a .net 4.0 web app

别来无恙 提交于 2020-01-04 06:02:57
问题 I am working on a web-based application using asp.net 4.0. I have some dlls I am using in the GAC that have some embedded dependencies on older dlls. I have Configured the assemblies so that the dependency redirects to the correct version of the dll on my machine. This works perfectly in a 3.5 or lower version application, however, when I try to build an asp.net 4.0 application based on the same dlls, it chokes with an error like: Could not load file or assembly 'ControlReferencedByMyDll,

Why isn't “renderAllHiddenFieldsAtTopOfForm” not working?

馋奶兔 提交于 2020-01-04 05:29:10
问题 In a .NET 4 web application I've set the property "renderAllHiddenFieldsAtTopOfForm" to "false" in the web.config. Unfortunately the hidden fields are still at the top. Why is this? Does some other setting override it? "pages" property in web.config: Screenshot of top of the form: ide it? 回答1: From the docs: all system-generated hidden fields are rendered at the top of the page. This makes sure that the information in these fields is sent to the server even if a postback is performed before

pass model from one action to another action in same controller

删除回忆录丶 提交于 2020-01-03 09:04:39
问题 I am trying to pass my model List< Models.Statement > statementList from one action to another but i am receiving null value in the 2nd controller. Please suggest what is wrong here. Even tried with: return RedirectToAction("WriteInTemplate", new { statementList = statementList }); Please help. public ActionResult SendPdfStatement(string InvoiceNumber) { try { InvoiceNumber = InvoiceNumber.Trim(); ObjectParameter[] parameters = new ObjectParameter[1]; parameters[0] = new ObjectParameter(

pass model from one action to another action in same controller

孤者浪人 提交于 2020-01-03 09:04:03
问题 I am trying to pass my model List< Models.Statement > statementList from one action to another but i am receiving null value in the 2nd controller. Please suggest what is wrong here. Even tried with: return RedirectToAction("WriteInTemplate", new { statementList = statementList }); Please help. public ActionResult SendPdfStatement(string InvoiceNumber) { try { InvoiceNumber = InvoiceNumber.Trim(); ObjectParameter[] parameters = new ObjectParameter[1]; parameters[0] = new ObjectParameter(

Get UserPrincipal by employeeID

懵懂的女人 提交于 2020-01-02 05:00:06
问题 I have implemented System.DirectoryServices.AccountManagement for authentication into my webapps finding users (UserPrincipal) byidentity given username. However, I have several cases where I need to get AD accounts given only an employeeID. Is there a good way to get a UserPrincipal (or even just the sAMAccountName) given an employeeID in AccountManagement? I currently have this working to grab users by username: PrincipalContext adAuth = new PrincipalContext(ContextType.Domain, Environment

Is page output cache stored in ASP.NET cache object?

杀马特。学长 韩版系。学妹 提交于 2020-01-02 03:50:08
问题 I need to enable caching in my asp.net application, but I do not want to use the webserver's memory for holding cache objects. If I add the page directive for output caching will the page be stored in the asp.net cache object? Thanks! 回答1: The default behaviour is to store the content in memory in the same way as HttpRuntime.Cache (actually in an internal HttpRuntime.CacheInternal which behaves similarly to the publicly visible cache), but in ASP.NET 4.0 you can write your own provider to