How to use local copies then use non local copies for production?

Jun 22, 2010 at 4:01 AM
Hi I want to use local versions of the jquery U.I(each file separated) so if something goes wrong I can quickly check in them. When I do production I want to use the one hosted on google. How can I make combres switch between the too? Thanks
Coordinator
Jun 22, 2010 at 12:41 PM

You can create 2 Combres.xml, one for local (e.g. Combres.local.xml) and one for production (e.g. Combres.production.xml), then change the definitionUrl in web.config as appropriately. Not completely automated, but I suppose that's simple enough to be an issue.

Jun 22, 2010 at 5:53 PM
buunguyen wrote:

You can create 2 Combres.xml, one for local (e.g. Combres.local.xml) and one for production (e.g. Combres.production.xml), then change the definitionUrl in web.config as appropriately. Not completely automated, but I suppose that's simple enough to be an issue.

That probably work. I will try that out. With asp.net mvc 2.0 I could just stick the defintionUrl in the release and debug and it would get the right one.
Jun 22, 2010 at 10:38 PM

Hmm I tired to do this. I am using mvc 2.0 so I have web.config, web.config.debug, web.config.release

So I did what yous aid I made 2 xml files and I stuck the paths(one of them into .debug and one into the release)

 

I get this error on when the combres handler is trying to be added

 

    System.UnauthorizedAccessException was unhandled by user code
      Message=Access to the path 'E: test.com' is denied.
      Source=mscorlib
      StackTrace:
           at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
           at System.IO.FileStream.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)
           at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
           at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
           at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
           at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
           at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
           at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
           at System.Xml.Linq.XDocument.Load(String uri)
           at Combres.ConfigReader.ReadCombresUrl(String filePath)
           at Combres.Configuration.GetCombresUrl()
           at Combres.WebExtensions.AddCombresRoute(RouteCollection routes, String name)
           at MyApp.MvcApplication.RegisterRoutes(RouteCollection routes) in E:\Global.asax.cs:line 19
           at MyApp3.MvcApplication.Application_Start() in E:\Global.asax.cs:line 46
      InnerException: 


line 19 ->  routes.AddCombresRoute("Combres");
line 46 ->   RegisterRoutes(RouteTable.Routes);

 

 

 

 

 

Coordinator
Jun 23, 2010 at 9:43 AM

Looks like you specified the incorrect path of the Combres.xml file, as it shows "E: test.com".

Jun 23, 2010 at 6:17 PM
buunguyen wrote:

Looks like you specified the incorrect path of the Combres.xml file, as it shows "E: test.com".

Well if I put my path to the .xml file in the top level of the web.config it works. If I move that same path to web.debug.config or web.release.debug it does not work. <combres definitionUrl="~/App_Data/CombresDevelopment.xml" /> test.com is like the folder where all my files sit for that solution.
Jun 25, 2010 at 2:12 AM

Could you make an asp.net mvc 2.0 project with 2 .xml files one going for the release and one for the debug so that I can try it on my computer and eliminate the possibility that something is wrong with my permission?