Author |
Topic |
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 February 2010 : 17:46:07
|
ok, second attemp
Image Grabber
replace all the files with these new ones, and change the database path etc in web.config, should now be ok. Just tested it on a snitz access db and it connects ok |
|
|
Todd
New Member
USA
63 Posts |
Posted - 23 February 2010 : 19:17:18
|
Thanks, I'm going to try the new code now. It took me 2 hours to get home from work in sleet and snow, whew, I made it home. |
Admin for the Tyco Collector's Forum
|
|
|
Todd
New Member
USA
63 Posts |
Posted - 23 February 2010 : 20:35:53
|
UPDate
It's almost completely working for me. It is reading the forums correctly and scouring the internet for those external images. It is also downloading them and putting them in the appropriate users uploaded folder.
But it isn't modifying the code to point to the new local images which were successfully brought in. |
Admin for the Tyco Collector's Forum
|
Edited by - Todd on 23 February 2010 22:50:08 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 24 February 2010 : 02:11:44
|
well that's a bit odd, it definately changed them for me.
How large is your database ? any chance you can give me ftp access to download it ? I don't have an access database with any data in so could only test it on sql |
|
|
Todd
New Member
USA
63 Posts |
Posted - 24 February 2010 : 10:54:56
|
quote: Originally posted by HuwR
well that's a bit odd, it definately changed them for me.
How large is your database ? any chance you can give me ftp access to download it ? I don't have an access database with any data in so could only test it on sql
Yes I will give you ftp access and email the information to you. Thank you. Database is about 50MB. Incidently, I've run this against the entire forum and it captured over 1000 pics and put them in the appropriate folders. Not sure how the code works but my fear is that it's too late to now actually make the link changes. If it finds an external link and tries to copy to uploaded/user folder and that image is already there, will it still change the topic code? |
Admin for the Tyco Collector's Forum
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 24 February 2010 : 13:49:00
|
yes it will, it will simply overwrite the image, that is the bit I don't understand, in my test it definitely changed the links since when I ran it a second time it no longer found any external images other than the failed ones, so not quite sure why it didn't do that for you. |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 24 February 2010 : 14:42:13
|
figured out the problem, just not used to connecting to access databses in .net have tested against a copy of your db and it seemed to work ok.
Image Grabber update (the updated zip does not contain the web.config file, so use the one you currently have |
|
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 05 May 2010 : 02:56:29
|
I've been trying to get this to work and I come up with this error on debugging
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] SnitzImageGrab.DataAccess..cctor() in D:\Development\SnitzImageGrab\SnitzImageGrab\App_Code\DataAccess.cs:12
[TypeInitializationException: The type initializer for 'SnitzImageGrab.DataAccess' threw an exception.] SnitzImageGrab.DataAccess.GetForumList() in D:\Development\SnitzImageGrab\SnitzImageGrab\App_Code\DataAccess.cs:41 SnitzImageGrab._Default.BindForumList() in D:\Development\SnitzImageGrab\SnitzImageGrab\Default.aspx.cs:27 SnitzImageGrab._Default.Page_Load(Object sender, EventArgs e) in D:\Development\SnitzImageGrab\SnitzImageGrab\Default.aspx.cs:20 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Any pointers please?? |
No good at coding, but I can plough a field !! |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 05 May 2010 : 05:51:26
|
Thanks Huw, I have just redone all changes made and started again... I now get this error..
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 13: <system.web> Line 14: <compilation debug="true"></compilation> Line 15: <authentication mode="Windows"/> Line 16: </system.web> Line 17: <system.codedom> Looking on the net this is something to do with having 2 web.config files?? |
No good at coding, but I can plough a field !! |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
|
Todd
New Member
USA
63 Posts |
Posted - 05 May 2010 : 22:14:38
|
I'm using an Access 2000 database and this utility worked very well. I do however still have one issue. Some people have decided to type the img tags themselves and they did it in all CAPS. The utility is case sensitive and converted every single lowercase instance but the uppercase instances are untouched.
I've tried using Access 2000 to open the database and do replace operations. I have no idea what's going on but it seems anything within the brackets isn't found when doing a find (or replace) So if I search for img or img within brackets, to cut it short I've tried all combinations of case, limitations, etc..
I'm at a loss. Anyone know how to work around this or of another editor that would be capable of just replacing all the uppercase img tags with lowercase? |
Admin for the Tyco Collector's Forum
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 06 May 2010 : 02:19:24
|
that could be because [] is reserved in SQL to do a regular sql search to find [] you probably need to do something like
WHERE COLUMN_NAME LIKE '%[IMG]%' ESCAPE '['
or
WHERE COLUMN_NAME LIKE '%[[]IMG]%'
anyway, I'm pretty sure I fixed the case sensitivity, will dig out my latest copy of the code and post it later today |
MVC .net dev/test site | MVC .net running on Raspberry Pi |
|
|
Todd
New Member
USA
63 Posts |
Posted - 06 May 2010 : 21:50:51
|
quote: Originally posted by HuwR anyway, I'm pretty sure I fixed the case sensitivity, will dig out my latest copy of the code and post it later today
Thanks, I didn't want to keep bothering for it, look forward to trying it out. |
Admin for the Tyco Collector's Forum
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
|
Topic |
|