TransformXml Task Failed Unexpectedly Error Message While Publishing Web Project in Visual Studio 2010

 

TransformXml task failed unexpectedly

one of the strange issues that I faced yesterday while trying to publish one of the web projects that I am working on. although the project compilation was working fine and when I run the project locally on my PC it was working fine without any issue.

After investigating for this issue I found the cause of this issue because the Web.config file was containing a special character inside it. so what I did is encode the special character then try to publish it again and things worked for me fine.

I had a very large Web.config file so looking for the special characters was not an easy job. I wrote a regular expression on Visual Studio that helped me on accomplished this job. so I would recommend to use regular expression to search Web.config instead of looking for the special characters inside the web.config file.

Tips to Secure IPad

Recently I got a new IPad. it is a wonderful thing to have such a device with that small size that has that functionalities. but storing your information on it might be risky thing if you did not secure your IPad. this devise is much easier to be stolen comparing with other devises. so you have to secure your devise to mitigate the side effect of loosing it. I have couple of tips that will make your devise more secure.

1. Use locking functionality on your IPad.

This is a basic security thing and will prevent anybody from getting into your devise and start looking into your data. you can do that from Settings—> general –> passcode lock.

2. User MobileMe service from apple.

This is a very nice feature. using MobileMe feature will enable you to find your device once you loose it. if you could not get it back, then you can wipe it remotely thus the devise will not contains any information related to you.

3. Backup

Always create backups of data you have on your devise. and make it a task that you are doing every once and awhile. you will not feel of the benefits of backups except you loose your IPad. at that time you will feel that you did a very good job once you backup your data.

4. do not connect to open WLAN networks.

Actually this is a general security tip and not related to IPad. it will be applied to all WiFi enabled devises. usually WLAN networks that are not password protected are open for hackers to get into it and start hacking devises connected to that WLAN.

5. Viruses

Currently there is much of viruses targeting IOS. but security experts are expecting an increase of viruses targeting IOS operating system. so you should aware of that and do not open any attachment that sent from a not trusted party.

 

those are a simple security tips to keep your IPad devise secure. I hope you will find them useful

How to recover from navigation damage on wordpress site

It happened once to have my word-press site down because somebody hack it. It was the first time to have my site down because somebody hacked it. the navigation on my site was not working probably. What make it bad is that I was not have any backup of my site. Having the risk of loosing my site’s content was like a nightmare for me.
The issue was basically the navigation was not working as well as if I try to use a valid URL it was not navigating to the correct page as well. Control panel was not accessible because of the same issue.
Then I start thinking what might bring the Navigation down. Then I start thinking what might be corrupted on my site. The good news I was using a customized theme so all what I did is deleting the theme I have on my site by using FTP client and restore it again. This solve the issue and I start putting strategy to backup my site and make sure to have a base to recover my site without even have any possibility of loosing my site’s contents. The mistake I have is having the theme folder with write permission for anonymous access. This security permission was required by a plugin. So I took that plugin out from my site and re-set the correct security permission on the theme folder.

Performance Troubleshooting (ANTS tool)

it happened once that a client raise an issue regarding to poor performance at certain area on an application that I was working on. That area was working perfectly on my environment, but at their environment it was not like that. I could not duplicate their environment locally because of security restrictions rules we have. Tracing code and do debugging was not helpful. Thus I decided to look into a tool that will help me on this mission.

I found a very nice tool that help me very much on tracing and figuring out the bottleneck on my application, that tool is called ANTS from Red-Gate. I strongly recommend to try this tool.

The good thing about this tool is that it is integrated inside the visual studio which making your life much easier when you want to start troubleshoot the performance issue. another thing that making it great is when you launch it from the visual studio, the result will be some sort of tree diagram for your code according to the resources utilization. Part of that diagram is the ability to see the code snap that you concerning about. also part of this output is an attribute that is showing you how many a certain method got called, you will find this very helpful because it will make you pay attention to methods that is getting called more than the expected numbers.

Red Gate providing this tool as a free trial to let you try it and make sure it is fitting to your business. you can check more about it by clicking here

Parallelism in .Net 4.0

One of the major enhancements that Microsoft has accomplished is enhancing the parallelism in many .Net class library. that is making things much faster and using the hardware in more effective way. in .Net 3.5 and earlier versions of .Net framework, wee have to using Threads to accomplish the same job. Actually .Net 4.0 is using Threads but that is internally at the .Net class library and it will be hidden from your code which is making your life much easier.

The new Parallelism feature of ..Net framework categorized into one of the folllowings:

1) Task Parallel:

including parallel implementaion for FOREACH and FOR loops letting you define the concurrent, Async tasks without working directlying into threads thing,

2) Parallel LINQ (PLINQ):

Significantly improves the performance of LINQ.

3) Data Structure for Parallel Programming:

including a high performance collection of classes with lock-free and at the same time it is thread safe including lightweight objects.

4) Tools to facilitate the Parallel Programming:

like debugger windows for tasks and parallel stacks.

Tips to Secure your Wireless network

these days almost everyone has a Wireless network (WLAN) either at home or at work. it is very nice to deal with WLAN as you are not have to set in specific place just to use the wire connecting you with your router.

the main issue with WLAN is any Wireless-enabled devise can connect to it not only your laptop or mobile devises. specially if your WLAN signal is accessible outside the boundary of your building. which means anybody can set outside and monitor your network traffic or even access internet using your WLAN. this is really scary !!

When I setup my WLAN network at home for the first time, I thought it is secured just because I have to provide passphrase (password) before I can access my network. after doing some researches I could find my network is not secured at all and I like transferring my data in front of everybody who can catch my network signal. I was accessing my bank accounts, providing my personal information, transferring files between different machines. this meant if anybody could successfully breakdown into my network, then I am officially dead!

so after I discover the fact that is my network is not secure, the first question I have what can I do to secure my network?. I can not go back to the Wired LANs. I could list 4 easy actions that you can do to make your network more secure:

1. make sure you are NOT using WEP Encryption:

WEP is stands for “Wired Equivalent Privacy” and this kind of encryption can be hacked within 30 Seconds, regardless of how complex your passphrase (Password) is. to solve this issue, switch and start using WPA2 encryption. it is much more secure than WEP and harder to be hacked.

2. Place your Wireless router in middle of your house or building:

This will minimize signal’s strength so that the WLAN signal will not be very strong outside the building boundaries.

3. ALWAYS use Firewall at your WLAN router:

Firewall will prevent intruder from accessing your Router administration site. Thus make the hacking possibility very low

4. Change the default SSID:

usually the default SSID indicate the brand name of your Router. this kind of info should not be publicly broadcast. thus just change it to something else. letting the hacker knowing the brand name of your WLAN router, make their hacking much easier.

 

I hope you will find these easy steps useful and this will make your network much securer than if you did not implement them.

My Experience with WordPress, Office Live and Google sites

during the last year I was using GoogleSites and MS Office live to host my site. I was spending lot of time just to implement things like RSS or enable users to comments on articles I am posting there. I trust MS and Google so I thought they are providing a good tool and will not find a better ready product at low cost.

after couple of days trying WordPress (free product), I found I was making a huge mistake by hosting my site on MS Office Live or Google sites. with couple of clicks I am doing things I was spending days to implement similar functionality at MS office and google sites.

I would strongly encourage you to try WordPress as platform to host your blog and I am pretty sure you will never say “I was mistaken by using WordPress”

Enable Remote Access for MS SQL Express Edition

By Default when you install SQL Server express edition on a machine you will not be able to connect to it  from another machine by using Microsoft SQL Server Management Studio or application. You need to do specific steps to enable SQL Server Express to accept connections from remote clients.

Recently I read a nice article posted to CodeKicks site about this issue, I would strongly recommend reading that article, to read it click hear

Loops Performance differences in .Net

I never thought there will be a big different when you use different approaches to iterate through a collection of objects. I knew there are some differences between FOREACH/WHILE/FOR loops, but I never thought the different will be as much as an article I read recently in an article published on codekicks site.

The article was demonstrate how using the foreach/while/For loops will affect the performance of your application. The first time I read the article posted there I got convened and posted a recommendation to read it to my personal site. a friend of mine read the article and we had a discussion about it. He had a very true observation about the test applied to come into the conclusion. The main issue raised by Ahmad (my friend who raised the issue) was about the internal operations done by each loop. For example, in FOREACH loop, it is doing an internal object retrieval and assignment to object reference which none of other loops doing it. Even if take this note into consideration, there will be some sort of performance differences between FOREACH/While/FOR loops.

So I still recommending reading the article but please keep into consideration that the test applied is not perfect.