BugNET

Open source issue tracking & project management
Welcome to BugNET Register | Login |

BugNET Forums

 
  Forum  Development  General develop...  0.8 Preview Release Feedback
Previous Previous
 
Next Next
New Post 8/25/2008 12:20 PM
User is offline LiFo
5 posts
No Ranking


Re: 0.8 Preview Release Feedback 

ther is nothing wrong with my setup
it is the design of DBResourceProviderFactory and the content of the table BugNet_StringResources that dos not match

if you look at DBResourceProviderFactory
public override IResourceProvider CreateGlobalResourceProvider(string classKey)
        {
            Debug.WriteLine(String.Format(CultureInfo.InvariantCulture, "DBResourceProviderFactory.CreateGlobalResourceProvider({0})", classKey));
            return new DBResourceProvider(classKey);
        }

        public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
        {
            Debug.WriteLine(String.Format(CultureInfo.InvariantCulture, "DBResourceProviderFactory.CreateLocalResourceProvider vp({0}", virtualPath));

            // we should always get a path from the runtime
            string classKey = virtualPath;
            if (!string.IsNullOrEmpty(virtualPath))
            {
                virtualPath = virtualPath.Remove(0, 1);
                classKey = virtualPath.Remove(0, virtualPath.IndexOf('/') + 1);
            }

            return new DBResourceProvider(classKey);
        }

you can see that when you call GetLocalResourceObject("Home")

CreateLocalResourceProvider is called with the virtual path "/UserControls/TabMenu.ascx"

and then the UserControl is stripped off an the other cunstructor is called with only "TabMenu.ascx"

if you look in the database there is no ResourceType with the name "TabMenu.ascx" only with the name "UserControls/TabMenu.ascx"

i can see that the hole localization thingy is in an early stage ther just has to be made a desition how to proceed keep the DBRsourceProviderFactory code and just use file names in the DB or use the whole virtual path in the DB

 
New Post 8/25/2008 12:26 PM
User is offline admin
645 posts
bugnetproject.com
1st Level Poster




Re: 0.8 Preview Release Feedback 

 LiFo wrote

i checked the svn source

the missing Default for home comes from

Default.aspx line 53
if you debug the error you can see that it is trying to get a resource for resourceType  = "TabMenu.ascx" and that in the DB it is called "UserControls/TabMenu.ascx"

i am also unable to install to a new clean DB only half works with the supplied DB
it complaints about missing "BugsNet_UserProfiles"

I believe that the vs web server and IIS treat the virtual directory different that is why it reports TabMenu.ascx instead of UserControls/TabMenu.ascx in IIS.   I think you can right click the web service and set the virtual directory to something or in the startup options in the project.


Davin Dubeau
BugNET - Core Developer

 
New Post 8/25/2008 1:32 PM
User is offline LiFo
5 posts
No Ranking


Re: 0.8 Preview Release Feedback 

Ahh yes that is the reason
then i would suggest replacing

virtualPath = virtualPath.Remove(0, 1);
classKey = virtualPath.Remove(0, virtualPath.IndexOf('/') + 1);

with 

classKey = VirtualPathUtility.ToAppRelative(virtualPath).Substring(2);

then it would work on both IIS and the build in webserver

 

 
New Post 8/26/2008 9:17 AM
User is offline admin
645 posts
bugnetproject.com
1st Level Poster




Re: 0.8 Preview Release Feedback 

 LiFo wrote

Ahh yes that is the reason
then i would suggest replacing

virtualPath = virtualPath.Remove(0, 1);
classKey = virtualPath.Remove(0, virtualPath.IndexOf('/') + 1);

with 

classKey = VirtualPathUtility.ToAppRelative(virtualPath).Substring(2);

then it would work on both IIS and the build in webserver

Thank you for the suggestion, I will make this change.


Davin Dubeau
BugNET - Core Developer

 
Previous Previous
 
Next Next
  Forum  Development  General develop...  0.8 Preview Release Feedback

Forum Policy

These Discussion Forums are dedicated to the discussion of the BugNET issue tracker.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:
1. No Advertising.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Site Moderators have the final word on approving/removing a thread or post or comment.
5. English language posting only, please.