Browse by Tags

SQL server data base restore script
Friday, July 03, 2009 7:29 AM
this is a quick trick that i googled from bits and pieces in a caffe when my laptop didn’t have a Management studio installed i found a way to execute sql scripts to my instance of sql express well to restore you need to have the logical names of files in the database backup to know that just type RESTORE FILELISTONLY FROM DISK = ‘<path to your backup file>... Read More...
by amir.magdy | with no comments
Filed under: ,
Database or Object Size in SQL server [sp_spaceused]
Monday, June 01, 2009 1:02 AM
Space used by the objects in the database is a tricky subject, this can be very useful when planning your database maintenance plan a system stored procedure as you probably had figured is called sp_spaceused gets you the needed information that procedure can be used in multiple ways use Northwind exec sp_spaceused when this is executed against your database... Read More...
by amir.magdy | with no comments
Filed under: ,
Fiddler 2 to monitor localhost ie7
Wednesday, May 27, 2009 6:46 AM
IE7 and .net framework are programmed never to request data localhost Just change the wording Localhost to your machine Name. this is a better explanation http://www.fiddler2.com/fiddler/help/hookup.asp#Q-LocalTraffic Read More...
by amir.magdy | with no comments
Filed under: ,
Change Web Service test page [wsdlHelpGenerator]
Tuesday, May 26, 2009 4:24 AM
the default web service page is a page that reveals a lot of the internal information of the application, this is something that you want to hide. Warning this does not really secure your web service. may be you should read something like this < configuration > < system.web > < webServices > < wsdlHelpGenerator href = "yourEmptyPage... Read More...
by amir.magdy | with no comments
Filed under: , ,
visual studio 2008 Team System setup a problem encountered while loading the setup components canceling setup
Tuesday, March 10, 2009 4:27 AM
i wanted to install an additional feature of Visual studio 2008 but when i started the setup process or tried to uninstall the application i got this error “Setup a problem encountered while loading the setup components. Canceling setup.” the Fix i went to check for fixes under that application uninstalled it and the the setup worked fine Read More...
by amir.magdy | with no comments
Filed under: , ,
Dynamically create domain users
Tuesday, February 10, 2009 2:14 AM
My Team was planning a Stress test scenario to be run on our stress lab, the application we were planning to test needed windows authentication to function. The plan was to create a set of users with predefined passwords and add them to the domain so the application can be tested correctly. We used VBscript that creates the users from a database table this is... Read More...
by amir.magdy | 1 comment(s)
Filed under: ,
Dynamically Resize an IFrame According to its contents
Tuesday, November 25, 2008 4:30 AM
problem with iframe is that you can't always predict the size of the content and eventually you'd end up with a scrollbar or even less convenient: a hidden part of the Iframe content this is a straight forward, easy way to make sure that the IFrame is properly resized according to the contents of the page loaded inside the Iframe. this will rely on the... Read More...
by amir.magdy | 4 comment(s)
Filed under: ,
Windows Fake URL test [hosts file]
Sunday, March 09, 2008 5:33 AM
you can make your application respond with a different behavior based on requested URL, This can be as simple as showing a different logo or as sophisticated as filtering data by that requested domain this is not such a big implementation problem, but it seems hard to test that is if you don't know how to fake that URL request on your localhost well there's... Read More...
by amir.magdy | 2 comment(s)
Filed under:
Yield in c#
Monday, February 25, 2008 3:47 AM
i've been trying to explain the keyword yield to a friend of mine for more than an hour and he did not get it. but finally when i typed in this example he finally did 1: class enu :IEnumerable 2: { 3: public IEnumerator GetEnumerator() 4: { 5: yield return 1; 6: yield return 2; 7: yield return 3; 8: } 9: } it actually means that when you are enumerating this... Read More...
by amir.magdy | 11 comment(s)
Filed under: ,
DotnetKicks on CommunityServer.org [in 24 seconds]
Monday, December 31, 2007 1:10 AM
i didn't do this the right way i didn't go through documentation or consult with forums, i just wanted to do this the quick and easy way, what i do is i keep a sepparate theme for my blog sepparate from other bloggers so i can change whatever i like without hurting anyone's blogs so what i really did is i edited to theme pages to show the dotnetkicks... Read More...
by amir.magdy | 1 comment(s)
Filed under: ,
Terminal server has exceeded maximum number of allowed connection [override maximum]
Thursday, December 27, 2007 2:55 AM
well there's an easy solution if need something urgently and u need to kick someone (close his session) mstsc -v:[UrServerNameOrIP] /console Read More...
by amir.magdy | 2 comment(s)
Filed under:
Enumerate App settings
Tuesday, December 04, 2007 3:21 AM
well sometimes you just need to enumerate all of the keys in your appsettings section in web.config this is how it's done 1: foreach ( string str in WebConfigurationManager.AppSettings.AllKeys) 2: { 3: Response.Write( string .Format( "Key : {0},Value {1}</br>" , 4: str, WebConfigurationManager.AppSettings[str])); 5: } Read More...
by amir.magdy | 1 comment(s)
Filed under: ,
Enumerate Embedded Resources
Tuesday, December 04, 2007 3:11 AM
sometimes you just need to include an image or an XML file with your package but you don't want to allow users to access these files and modify them, all you have to do is to embed these files in your assembly if this assembly is a DLL or an EXE. just add the files to your project and from the file properties select the build action to be "Embed Resource"... Read More...
by amir.magdy | 1 comment(s)
Filed under: ,
SQL Profiler custom filter
Friday, November 23, 2007 8:13 AM
the tip is simple u need to make a filter that filters and shows only your DB transactions on a server. what u need to do is to change your web.config by adding a string that you can later filter on 1: < add key ="Main.ConnectionString" 2: value ="data source=Server;initial catalog=dbName; 3: User ID=sa;Password=userName;application name=thisIsTheFilter"... Read More...
Override IIS Maximum upload size [max upload size in asp.net]
Saturday, November 17, 2007 1:56 AM
by default IIS enables you to upload 2 megabytes and i couldn't seem to figure out how to change that using Internet service manager snap in but i found this on msdn and it's working perfectly fine alll you have to do is add this node right under <system.web> section in web.config 1: < httpRuntime maxRequestLength ="size in KiloBytes"... Read More...
by amir.magdy | 1 comment(s)
Filed under: , ,
More Posts Next page »