Ver Fonte

Set DataDirectory substitution string (http://blogs.msdn.com/dataaccess/archive/2005/10/28/486273.aspx)

svn path=/trunk/mcs/; revision=66512
Konstantin Triger há 19 anos atrás
pai
commit
caace6cabd
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      mcs/class/System.Web/System.Web.J2EE/BaseHttpServlet.cs

+ 4 - 0
mcs/class/System.Web/System.Web.J2EE/BaseHttpServlet.cs

@@ -45,6 +45,8 @@ namespace System.Web.J2EE
 		static LocalDataStoreSlot _servletResponseSlot = Thread.GetNamedDataSlot(J2EEConsts.SERVLET_RESPONSE);
 		static LocalDataStoreSlot _servletSlot = Thread.GetNamedDataSlot(J2EEConsts.CURRENT_SERVLET);
 
+		static String DataDirectory = String.Concat (System.IO.Path.DirectorySeparatorChar, "App_Data", System.IO.Path.DirectorySeparatorChar);
+
 
 		public BaseHttpServlet()
 		{
@@ -101,6 +103,8 @@ namespace System.Web.J2EE
 				AppDomain servletDomain = (AppDomain)this.getServletContext().getAttribute(J2EEConsts.APP_DOMAIN);
 				servletDomain.SetData(IAppDomainConfig.APP_VIRT_DIR, req.getContextPath());
 				servletDomain.SetData(".hostingVirtualPath", req.getContextPath());
+				//Set DataDirectory substitution string (http://blogs.msdn.com/dataaccess/archive/2005/10/28/486273.aspx)
+				servletDomain.SetData ("DataDirectory", String.Concat (req.getContextPath (), DataDirectory));
 
 				// Put to the TLS current AppDomain of the servlet, so anyone can use it.
 				[email protected](servletDomain);