Red Gate forums :: View topic - embedded resource not found after using RCaE option
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

embedded resource not found after using RCaE option

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
ISDeveloper



Joined: 28 Nov 2012
Posts: 3

PostPosted: Wed Nov 28, 2012 4:52 pm    Post subject: embedded resource not found after using RCaE option Reply with quote

I have a website .dll which has an embedded resource of a .js file. If I use the Smart Assembly option of Resources Compression and Encryption, then when the website is activated I get a message stating:

Assembly xx.xxx contains a web resource with name xxx, but does not contain an embedded resource with name xxx.

If I do not use this option, everything works fine. We want to use this option to ensure that the .js code is completely encrypted so that it can't be read.

Is there something that I might be missing?

Thanks in advance for any help.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1121
Location: My desk.

PostPosted: Thu Nov 29, 2012 5:36 pm    Post subject: Reply with quote

Thanks for your message relating to Smartassembly.
Could you please give an example of how you're referencing the resource in your code? If you're using any type of reflection mechanism, it won't work as the resource has been renamed.

Also, what version of Smartassembly are you using?
Back to top
View user's profile Send private message
ISDeveloper



Joined: 28 Nov 2012
Posts: 3

PostPosted: Thu Nov 29, 2012 8:44 pm    Post subject: Reply with quote

Example:

A snippet from the login .aspx:

<asp:ScriptManager ID="ScriptManager" runat="server">
<CompositeScript>
<Scripts>
<asp:ScriptReference Name="MC.WebSite.Scripts.MTJavascript.js" Assembly="MC.WebSite" />
</Scripts>
</CompositeScript>
</asp:ScriptManager>


From the .aspx.cs code-behind for the login page


protected void Page_Init(object sender, EventArgs e)
{
BtnLogin.Attributes.Add("onClick", "return MyJavascript.setBusy(30);");
}

We are running Smart Assembly version 6.70.239
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1121
Location: My desk.

PostPosted: Wed Dec 05, 2012 3:24 pm    Post subject: Reply with quote

Sorry for the delay in replying, I never got an email from the forums telling me you'd posted.

My guess would be that because you're referencing the .js by name in a string, this is incorrect due to renaming once the .js resource is embedded, as it gets renamed.

I'm not sure of any workaround for this- if you reference a resource directly in code, then Smartassembly will rewrite the reference to the new name so it works, but in your case you're accessing it via a String and I don't think we'll touch that.

I'll see if anyone knows of a workaround and update.
Back to top
View user's profile Send private message
ISDeveloper



Joined: 28 Nov 2012
Posts: 3

PostPosted: Wed Dec 05, 2012 4:23 pm    Post subject: Reply with quote

Thanks for the help.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1121
Location: My desk.

PostPosted: Fri Dec 07, 2012 11:40 am    Post subject: Reply with quote

I'm not sure we have much else in the way of ideas so far; it may well be a limitation of the tool combined with your particular code. If you can create a small sample that demonstrates the issue I'm able to have a bit more of a play with it to see if there's anything else we can suggest though? If this is possible, you can mail it across to support@red-gate.com quoting F0067202 in the subject.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group