.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Code working in Xp bur showing Error in Vista

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :Sql Server

Hi all.


I am saving two data, One is date and other one is time in SQL server 2005 using asp.net ( VB.net).

I am saving this using following command:

cmd.commandtext = "insert into TABLE1 values ('" + Now.toshortdatestring + "', '" + Now.toshorttimestring + "')"


now while i am using this code in Windows Xp its working properly but in Windows VISTA it is showing some "Data Conversion Error  from string to datetime". 

If i remove the single quotes [ ' ] from the command it is showing error in the value of date and time.

thanks all



View Complete Post

More Related Resource Links

Showing Designer error for Silverlight App when trying to access resource which contains code e.Resu

Environment is: Silverlight 4, VS Studio 2010. Designer is showing error in a Silverlight App when trying to access a resource as below. And there are no build or runtime errors. Extensive research found that, in the "InvestorsProvider" class I am using wcf services, which has a callback method. In the call back method I am using this statement "this.MyProperty = e.Result" where e.Result is ObservableCollection. If I remove the e.Result it is not showing any designer problem. <UserControl.Resources> <local:InvestorsProvider x:Name="investorsProvider"></local:InvestorsProvider> </UserControl.Resources> Here is the error System.Reflection.TargetInvocationException [Async_ExceptionOccurred]Arguments: Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50401.0&File=System.dll&Key=Async_ExceptionOccurred at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at SilverlightApplication9.ServiceReference1.GetInvestorsCompletedEventArgs.get_Result() in C:\Documents and Settings\mennis\my documents\visual studio 2010\Projects\SilverlightApplication9\SilverlightApplication9\Service References\ServiceReference1\Reference.cs:line 115 at SilverlightApplication9.Inves

Error while installing .NET 3.5 SP1 on Vista 32 bit - error code 14107


I have Vista Home Premium 32 bit on laptop and have recently uninstalled Microsoft .NET Framework 3.5 Service Pack 1 because one of the software vendor has asked he to reinstall .NET 3.5, but the "update for Microsoft .NET Framework 3.5 Service Pack 1(KB963703)" is still there in the Installed Updates list.

The installation aborts with an error message in log "Microsoft .NET Framework 2.0SP1 (CBS): [2] Error: Installation failed for component Microsoft .NET Framework 2.0SP1 (CBS). MSI returned error code 14107"

I search for the solution in the forum, but none of them helped me, except couple of them explaining how to collect the logs.


and i have done the same.

Any one please help me in resolving this problem. many thanks in advance.




Ho to fire the Application Error in asax from the code?


 Hi All,

I have this code in Global.asax but it not firing once an error occured:


void Application_Error(object sender, EventArgs e)



        // Get the error details

        HttpException lastErrorWrapper = Server.GetLastError() as HttpException;

        Exception lastError = lastErrorWrapper;

        if (lastErrorWrapper.InnerException != null)

        lastError = lastErrorWrapper.InnerException;



        string lastErrorTypeName = lastError.GetType().ToString();

        string lastErrorMessage = lastError.Message;

        string lastErrorStackTrace = lastError.StackTrace;



Please help me so I can call this method from any page?

Thaxxxxxxxxxxxxx a lot,



Smart Storage: Protect Your Data Via Managed Code And The Windows Vista Smart Card APIs


Smart cards are a compelling alternative to the reliance on passwords, which are the weakest link in authentication systems. Get the Windows smart card programming basics here.

Dan Griffin

MSDN Magazine November 2006

Custom tool error: Failed to generate code for the service reference 'CompanyService'. Please che


A little background because I feel I have an out of the ordinary architecture in place and don't know if this is contributing to the problem. 

We have an existing ASP.net application that is undergoing expansion.  The new functionality is all written in Silverlight 4.  As part of that expansion I gutted all the old Linq to SQL and put Entity Framework 4 into place.  To do this I created a standard .net Class Library and added my edmx files there.  Naturally, the business entities created by this cannot be used in Silverlight.  So I created a Silverlight Class Library and added all the business entities to that Silverlight Class Library as linked files.  I changed the name space to be the same.

So I have the following assembly / namespaces

Company.Project.Dal.csproj / Company.Project.Entities (.net 4 class library)

Company.Project.Entities.csproj / Company.Project.Entities (SL4 class library)

With this architecture I was able to share my business entities with my SL enabled web services, my asp.net projects, my silverlight projects.  Really it's a beautiful thing.

Once this was done I added "message" classes to Company.Project.Dal and again shared them with the other entites using linked files.  These messages are things like MyObjectRequest; they are class

Resume SharePoint Services Web Application and returns code 1387 error


Hello everyone! Newbie here. I would like to ask how to start the SharePoint Services Web Application on (WSS3.0,internal database, stanalone users) without getting error 1387 ?

I would love to provide more information regarding this issue but what I got is error 1387 displayed in the browser.

I look forward to seeing you guys feedback from your expertise angle.



Using tabs from the AjaxControlToolkit causes error: ...control contains code blocks (i.e. <% ... %>


I'm getting the error:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

When attempting to add the tabs from the AjaxControlToolkit.  A little background..Theres an existing aspx page in a microsite which used the accordion control and the tabbed control ...I need to modify this page to use a different masterpage. 

The original site was .Net Framework 2.0 and the page in question used AjaxControlToolkit 1.0. which I manually installed originally.  Some of the site has been further developed using the .Net Framework 3.5.  (Come with AjaxControlToolkit) Now I have come to update this aspx page and I get the error above.

I have narrowed the down to the TabContainer (I think)  Does anyone have any experience with this sort of problem?  Also what version of the AjaxControlToolkit should be with the .Net Framework 3.5? I have 1.0.20229.20821. 

I also tried to browse to the AjaxControlToolkit.dll to add the tools to the tool box as they're missing... thinking this may be an indicator as to why it wasn't working. I get the error: 'There was an error loading types from assembly C:\inetpub\wwwroot\project\Bin\AjaxControlToolkit.dll Could not load file or assembly 'System.Web.Extensions. Version=

Web Part working fine on the top-level page but 'Not Safe' error on lower-level pages.


I have created a Web Part which reads and parses the SharePoint logs in order to display usage information of the page it resides on.  The Web Part works perfectly on the top page, reading and displaying the information desired.  However, once the Web Part is added to any page lower in the site heirarchy (sub-page) the same Web Part throws the following error:

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Show Error Details
Hide Error Details

[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.]
  at Microsoft.SharePoint.ApplicationRuntime.SafeControls.GetTypeFromGuid(Guid guid)
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts)

Of course the current version of the Web Part is in the SafeControls list on the web.config.

The Web Part was originally designed to return site activity only for the top default.aspx page and worked fine but started to fail in the manner described above once I added the following line of code to return a SPCo

Code write file asp.net 2.0 is working in firefox but IE not working.

If Not IsDBNull(ext) Then                                        ext = LCase(ext)                                    End If                                    Select Case ext                                        'Case ".htm", ".html"                                        '    type = "text/HTML"                   

Error code 737D-Trying to download update

My computer is recommending that I download this: Security Update for SQL Server 2005 Service Pack 3 (KB970892) But it tells me this: Installation status: Failed Error details: Code 737D Update type: Important A security issue has been identified in the SQL Server 2005 Service Pack 3 that could allow an attacker to compromise your system and gain control over it. You can help protect your computer by installing this update from Microsoft. After you install this item, you may have to restart your computer. System: Windows Vista Home Premium Service Pack 2 HP Pavilion dv6700 notebook PC 32-bit Operating System Any ideas???  

SQL Server 2008 installation fails There was an error generating the XML document. Error code 0x84B

My system config: window XP - SP3 4 GB RAM, I have VS2008 with SP1, VS2010 Ultimate installed First when I tried to install SQL 2008 R2 Dev edition I got an error saying vs2008 SP1 was not installed, infact I had the SP1 installed in my m/c.  I did reinstalled the SP1 and tried to install SQL again. while in the final installation process I got the error  "Setup has encountered the following error: There was an error generating the XML document. Error code 0x84B10001." I uninstall the SQL server again to remove the files which were created from Unsuccessful installation I removed the register entry as suggested by this forum. reinstalled but no chance, I have tried all the option which I can get know in web. Please help me. here is the log files details  Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException 2010-08-26 14:54:53 Slp:     Message: 2010-08-26 14:54:53 Slp:         There was an error generating the XML document. 2010-08-26 14:54:53 Slp:     Stack: 2010-08-26 14:54:53 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache) 2010-08-26 14:54:53 Slp:   &nb

WebFaultException throwing a "not handled by user code" error and returning an HTTP 500 to the clien

I am trying to return a BadRequest and simple message when implentation throws an error in a WCF REST service, but the WebFaultExcption itself is throwing an exception and returning an HTTP 500 instead. Any ideas on why this might be happening? Here is a short code snippet: [WebDispatchFormatter] [WebHelp(Comment="Initiate an immediate or callback appoinment request")] [WebInvoke(UriTemplate = "InitiateContact", Method = Verbs.Post)] public string InitiateContact(AppointmentRqst rqst) {      string ret = string.Empty;      rqst.DeviceId = Helper.GetHttpAuthHdrDeviceId();      try      {          ret = impl.InitiateContact(rqst);      }      catch (Exception ex)      {          throw new WebFaultException<string>(ex.Message, HttpStatusCode.BadRequest);      }      return ret; }

.Net Frameworks 3.5 Error code 1603

This is my error log, please help me. [02/11/10,13:32:48] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,13:32:48] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/10,13:33:07] WapUI: [2] DepCheck indicates WIC Installer is not installed. [02/11/10,13:36:40] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,13:36:40] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/10,13:37:00] WapUI: [2] DepCheck indicates WIC Installer is not installed. [02/11/10,13:42:15] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,13:42:15] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/10,13:42:37] WapUI: [2] DepCheck indicates WIC Installer is not installed. [02/11/10,13:51:05] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,13:51:05] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/10,13:51:22] WapUI: [2] DepCheck indicates WIC Installer is not installed. [02/11/10,14:05:01] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,14:05:01] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/

error code 0xc000007b

after my system boots i get a message saying..application failed to initialize(0xc000007b)... what is the solution please

Solved: LDAP authentication: error code 49 - 80090308, comment: AcceptSecurityContext error, data 52

Hi, I have a problem conneting to another domain (far.away.domain). We have a two-way trust to this domain. Also I can access the DS using ADSI edit and our Administrator account (ourdomain.com). I tried several types of credentials (userid = "CN=Administrator,CN=Users,DC=ourdomain,DC=com", "Administrator @ ourdomain.com" (without blanks)...). Connecting to ourdomain.com is no problem, but to far.away.domain I can't connect, I always get the error 525 (user not found). What could be the problem? Have I to use an entry from the ForeignSecurityPrincipals CN of the far.away.domain? I also tried to connect using Softerra LDAPBrowser and a command line ldapsearch without succes and with not a better error message. But why is it not possible to use a trusted account, or is this a active directory feature and does not work with pure LDAP bindings? Best regards, Nils.

COM Interop Error loading type library/DLL TYPE_E_CANTLOADLIBRARY error in Vista but not XP

I have created a .NET executable that is using a COM assembly that is located on a servers shared drive but am  having problems getting it to work on a number of machines. I have made sure to register the COM assembly using regsvr32 and doing that it works on the computer that I developed it on. From there I brought it over to a Windows XP computer where it didn't work. I received an error message saying "Error loading type library/DLL ... (TYPE_E_CANTLOADLIBRARY)", which was in reference to the COM assembly. After some trouble shooting I found that if I granted the executable FullTrust in the .NET security model the .NET executable was able to load the assembly and everything worked properly. From there I brought the executable to a Windows Vista computer, registered the COM assembly using regsvr32 and granted the .NET executable FullTrust in .NET but it doesn't work. I get the same error saying "Error loading type library/DLL ... (TYPE_E_CANTLOADLIBRARY)". Any idea why the same steps would work in XP but not in Vista? Am I missing something obvious? Any suggestions would be greatly appreciated.

SSIS Package working on SQL Client Machine but when trying to run on SQL Server machine giving error

Hi We are trying to run SSIS package on sql server machine but sometimes it is giving error for data flow task containing Script Component. Error is - [SSIS.Pipeline] Error: component "SCR DimensionRelation" (1) failed the post-execute phase and returned error code 0x80004002. This error is not coming continuously. And also not for specific DFT. It comes for different DFTs as we rerun the package. Can anybody help me on this? We are using SQL server 2008. We are not getting any error on client machine :(:(
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend