I have a .ddb file that is used as a telephone directory for an application written in flash/VB.net (i guess). The problem is that the application is crashing and my only was to access the application is through the mysterious (*.ddb) file (99% of the application size.)
The application contains an also mysterious dll (NK_SQLite.dll).
So far I have tried:
SQLite Browser
tried opening the file in PL/SQL
tried opening the file in SQL Server
Any ideas about how to solve this issue,
Is it possible that the DDB extension is misleading? Have you tried opening it as a CAB or ZIP file? The NK_SQLLite.dll file certainly makes it sound like a SQLLite database but again it could be a red herring.
Another possibility... if any of the code is .NET, have you tried disassembling it? You might get some hints about what's going on that way, so long as it's not obfuscated. If you're unfamiliar with how to do that, I would recommend a tool like RedGate's Reflector (http://www.red-gate.com/products/reflector)
Related
I recently was handed a project that went bad. I only have access to the code live on the server.
Is there a way to grab all of the files from the server and have a working version on my local machine.
The .aspx files on the server do not seem to contain the .aspx.cs files that i am looking for.
If you have access to the files on the server, you can copy all files (and other related things such as databases) and it should run as-is.
If you have none of the code however you won't be able to change much. .aspx files are compiled at runtime so you can change whatever is in them, but logic will not be as easy.
.NET code decompiles reasonably nicely if it hasn't been obfuscated so you might try that as a last resort. But seriously, just find whoever originally wrote it and extort them until they divulge the source code.
I have developed an application win QT which uses SQLIte database. The copy of database is located on each site.
On one site let's say site 'BOB1' it works perfectly without any problem. But when we try to use it on another site lets say 'BOB2' it takes long time to open a database connection(approx 2000 milliseconds).
I thought that perhaps there is a network problem, So they tried to use the server of the site 'BOB1' as their server, which works fine. But when i tried to use the server of the site 'BOB2' from the site 'BOB1', I have the same problem. So i thought it may not be the network issue.
Another thing that came to my mind was that, perhaps there is a problem of DNS resolution. But when i tried to ping the server using IP and hostname, the response time is the same.
Any idea or pointer that what can be the problem.
PS: Server + database file path is specified in the setDatabasePath() fuinction using enviornment variables.
Consider copying the database to the local machine (eg temp folder if transient, or other suitable location if permanent). You can safely use either file copy, or consider using the qt backup API to ensure that the transfer happens successfully (plus you get the option of progress feedback)
https://sqlite.org/backup.html
You could even "backup" the file from the remote server to in-memory if the file is small and you say you're reading only?
You can see some sample code here on how to import an sqlite DB into a Qt QSqlDatabase. Note that when you do this, you want to make sure the version of sqlite native API that you're using is the same as that compiled into Qt, or you may get error messages from sqlite or Qt.
I have an ASP.NET web app that uses web forms with Telerik controls and a few other libraries, runs on windows azure, and uses sql azure. I'm using Process Monitor to see what happens on the machine during application startup (trying to diagnose why the initial startup takes about 1min but that's a separate question). I see lots of CreateFile events from the w3wp.exe process hosting my app pool that have Path = \\replace_with_server_name\PIPE\sql\query and Result = BAD NETWORK PATH. Where are these coming from!?
I've searched my source code and don't find replace_with_server_name anywhere. I'll try searching through all the referenced dlls of the solution but does anyone recognise this path and have a suggestion where it might come from?
Note that \\replace_with_server_name\PIPE\sql\query is the exact Path that I see in Process Monitor - I haven't modified it for the purposes of this question. I'm guessing some library I'm using has this value as a default, or something like that.
Update -
I've searched through all the dll and config files in my bin directory, and through all the dlls in the .NET Framework directory and through all the config files in the .NET Framework\Config directory, but haven't found "replace_with_server_name" anywhere. I've also searched various locations like all .dlls in c:\windows\system32, all files in c:\windows\Microsoft.NET, and no luck.
Any ideas on other places I can look? I did some of my searching using HxD editor and then I found PSPad which will do a hex search of multiple files - much quicker. I searched using Windows, ANSI, UTF-8, UTF-16 LE, and UTF-16 BE with no luck ... although it's possible I missed a couple of variations. Surely this text has to be somewhere!?
The CreateFile Win32 API is used to open many streams including named pipes. It looks to me like something in your code is trying to created a named pipe connection to your SQL Server, but the server name specified in the connection string is 'replace_with_server_name' by default.
You might want to take a look at your config file and/or any code that describes the name of the SQL server to which you want to connect and be sure to specify the correct server name.
HTH.
Maybe i'm totally outdated but for last four years i've been using simple FTP upload feature while uploading new website even without building it within Visual Studio. Just bunch of ASPX and CS files as in Visual Studio.
I do understand that compiling the project will provide me with some security defence so ones who have access to the server won't be able to read those files in text editors and i will avoid first time compilation but is that so important?
I mean, you can always do a lot of harm if you have access to server that just reading CS files instead of DLL.
First time compilation usually takes no more than 1 minute just searching for compiled version of the site will take as much time.
Now i'm watching video on PluralSight which explains new MSDeploy tool available from ASP.NET and i can't see any good reason to use it.
So what's wrong with the old fashioned way of just sending files via FTP without compiling or using fancy tools?
I did speed test and with MSDeploy i can deploy a website twice faster than old-fashioned FTPing. So instead of 4 minutes it will take 2.
Now from another perspective, when i already have alive project on the web. In which have to change Default.aspx because i have typo in some html tag. Deployment via MSDeploy will take 10 times more than uploading one file
Maybe i miss something?
MSDeploy does things which FTPing to a site can't do. Need to change a machine.config? You're unlikely to have FTP write access to the folder which contains it. Want to change a server setting in a server-version-independent manner? FTP won't do that. Etc. FTP works fine for copying files to folders in which you have write access, but that's all it can do.
When you deploy a project you can do a lot of things with it.
You can set up a job in your deploy that packages all your javascript into one file and all your css into one file.
You can set up a job in your deployment that changes a bunch of config settings to match your production server settings (rather then development settings).
The idea of deployment is that you take your current development website and transform it into a production website without having to do any of that manually.
The most important thing is that when you can only deploy your website you will never forget to package your js or forget to remove some debugging code because you can't just sneakly update a single file.
I am getting a strange issue where I seem to have read access, because I can
1. Get a list of files from a directory (Directory.GetFiles())
2. Load an XML document using XmlDocument instance's Load() method
But I can't use File.ReadAllText() to load a text file into memory. Gives me an System.UnauthorizedAccessException. I am not even trying to read from a network directory, just a local one. I've also used System.Security.Principal.WindowsIdentity.GetCurrent().Name to check the working user which is [CompanyDomain]/[MyUserName] and this user has full access to the directory I am using. I've also checked that the directory actually exists.
My environment
1. Windows Server 2003 Standard Edition
2. Visual Studio 2008
3. Just using the built in web server that launches every time i run the project.
Note: I couldn't find the IUSR_MACHINENAME user on this machine.
Any idea what steps I should take next?
Cheers,
James
One thing to assert:
the file that can be Xml Load()-ed is the very same file that cannot be ReadAlText()-ed ?
When things get odd like this, I found that turning auditing on, at the level of the directory or even of the file, often ends up pointing me towards a proper diagnostic and hence resolving the issue.
Also: In looking online reference for ReadAllText() I noted that (oddly, I think), this exception can be caused by:
path specified a file that is read-only.
Not sure why write access should be sought by this apparent read-only operation, but, maybe just try to make the file r/w-able.
http://msdn.microsoft.com/en-us/library/72wdk8cc%28VS.71%29.aspx
<identity impersonate="true" />