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

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

Convert System.Net.NetWorkCredentials to IReportServerCredentials

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

Hello, I have a reportviewer and I want to set its credentials with this line but I have that error.



rptViewer.ServerReport.ReportServerCredentials = new System.Net.NetworkCredential(usuario, clave, dominio);

Error 18 Cannot implicitly convert type 'System.Net.NetworkCredential' to 'Microsoft.Reporting.WebForms.IReportServerCredentials'. An explicit conversion exists (are you missing a cast?) C:\Inetpub\wwwroot\GescomDllo\Protected\01_Administradores\rptdefinicioncompetencias.aspx.cs 40 58 http://localhost/GescomDllo/


any idea??

View Complete Post

More Related Resource Links

How to convert System.Type to Data.DbType?

Hi,Is it possible to convert a System.Type to Data.DbType (this is unfortunately an enumaeration)?Thanks, Rainer.

Cannot convert from 'int' to 'System.Data.OracleClient.OracleParameter' - Problem with OracleHel

Hi I downloaded the OracleHelper.cs & I use VisualStudio 2008,I'm suppose to pass values to a stored procedure which accepts 2 parametersWhen i pass from codebehind it says,Cannot convert from 'int' to 'System.Data.OracleClient.OracleParameter'Cannot convert from 'string' to 'System.Data.OracleClient.OracleParameter'The best overloaded method match for 'DataWrapper.ExecuteNonQuery(string, System.Data.CommandType, string, params System.Data.OracleClient.OracleParameter[])' has some invalid argumentsI'm posting mycode,Using STORED PROCEDURE,OracleHelper.ExecuteNonQuery (con, CommandType.StoredProcedure, "sample", Int32.Parse(TextBox1.Text),TextBox2.Text); Plz help !______________________________________If possible,  tell me a solution for this error too !http://forums.asp.net/t/1598804.aspx

Static Method System.Convert.ToDateTime() throws a FormatException on Windows7

Hello, There is a strange bug with the method System.Convert.ToDateTime(). Trying this simple statement Convert.ToDateTime("10/9/2010 17.39"); on a windows vista/xp works and the conversion is done. If you try that on a windows 7 than you get a format exception. Anybody has this problem? https://connect.microsoft.com/VisualStudio/feedback/details/597405/static-method-system-convert-todatetime-throws-a-formatexception-on-windows7#details Best regards. Thank you.

How to Convert System.Drawing.Image Variable to Byte variable



I got a variable of type System.Drawing.Image and need to convert it to a variable of type byte so I can store the image in the database. Can someone show me how to do that in VB.NET code.

Thanks alot

Unable to convert type System.String to System.Web.DynamicData.MetaTable



I am encountering the problem  "Unable to convert type System.String to System.Web.DynamicData.MetaTable" when I hit one of the tables for List.aspx.  It is using the DynamicData/PageTemplates/List.aspx and this error is not happening in other tables.

It is happening on the line

GridView1.SetMetaTable(table, table.GetColumnValuesFromRoute(Context));

If you have any leads, please let me know.



Convert System.Window.Forms.Keys into WPF (system.windows.input.key)



I am trying to add some short cuts to my WPF app. I read an xml file which especifies the shortcut key with it is system.windows..forms.keys value (e.g: 114, that will be F4)

The idea of having to create a switch to return the right key based on it is value it is, to say the least, horrendous, so before I start doing that :( ... does anyone knows how I can convert that value into a system.windows.input.key? Any help will be appreciated.



Unable to convert MySQL date/time value to System.DateTime



I get the following error when i call my method from the class any ideas?

Unable to convert MySQL date/time value to System.DateTime

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: MySql.Data.Types.MySqlConversionException: Unable to convert MySQL date/time value to System.DateTime

Source Error:

Line 324:        string strqry = "Select * FROM tblclients";
Line 325:
Line 326: DataTable returnDatatbl = conClass.queryDB(strqry);
Line 327:
Line 328:

Cannot implicitly convert type 'System.Web.UI.WebControls.TreeNode' to 'System.Xml.XmlNode



I bind xml to treeview and select the node.I write code as

XmlNode xnParent = TreeView1.SelectedNode.Parent;
        XmlNode xnchild = TreeView1.SelectedNode;

But i got error these places.

Error    1    Cannot implicitly convert type 'System.Web.UI.WebControls.TreeNode' to 'System.Xml.XmlNode'    E:\SVN_WORK1\Projects\Server\VegaFABSWeb\Admin\DataDictionary.aspx.cs    36    28    E:\...\VegaFABSWeb\


Rama Krishna

System.ArgumentException: Cannot convert System.ArgumentException:

System.ArgumentException: Cannot convert to System.Int32.
Parameter name: type ---> System.FormatException: Input string was not in a correct format.
  at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
  at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
  at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
  at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
  at System.Web.Services.Protocols.ScalarFormatter.FromString(String value, Type type)
  --- End of inner exception stack trace ---
  at System.Web.Services.Protocols.ScalarFormatter.FromString(String value, Type type)
  at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection)
  at System.Web.Services.Protocols.HtmlFormParameterReader.Read(HttpRequest request)
  at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
  at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
this error giving . i don't know more about webservice . any body knows answer post here
my code is following



System Development Life Cycle

The Systems Development Life Cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved including the waterfall model (the original SDLC method), rapid application development (RAD), joint application development (JAD), the fountain model and the spiral model. Mostly, several models are combined into some sort of hybrid methodology

The Agile System Development Life Cycle (SDLC)

The goal of this article is to describe the agile system development life cycle (SDLC), putting it in context from what you may have heard about within the agile community and more importantly within the context of your overall IT efforts.

Performance Tests: Precise Run Time Measurements with System.Diagnostics.Stopwatch

Everybody who does performance optimization stumbles sooner or later over the Stopwatch class in the System.Diagnostics namespace. And everybody has noticed that the measurements of the same function on the same computer can differ 25% -30% in run time. This article shows how single threaded test programs must be designed to get an accuracy of 0.1% - 0.2% out of the Stopwatch class. With this accuracy, algorithms can be tested and compared.

Convert English to Arabic number without changing any regional settings in .net

Well, most applications that I worked with was multilingual that supports English UI and Arabic UI.

And one of the major issue that we have faced is displaying Arabic numbers without the need of changing the regional settings of the PC.

So the code below will help you to display Arabic number without changing any regional settings.



hello i have the following problem

i have upload my content to hosting server but i get the following error

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

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:

[SecurityException: Request for the permission of typ

Problem upgrading to MVC3 - System.Web.Routing



I'm trying to upgrade to .NET 4 and MVC 3.

When trying to compile my project, I get the error:

Error 1 The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) C:\Users\spencer\Desktop\weblauncher\Common\MVCConfig.cs 4 18 Common

The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

I do have the System.Web.Routing in my references for the project.

BUT - when I try to view System.Web.Routing in the OBJECT BROWSER, nothing is inside!  The System.Web.Routing namespace is not in there - the entire thing is empty!  Could it that the dll is corrupted?  I tried to reinstall the .NET 4 and MVC 3 stuff, but its still empty!

The dll is coming from here:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Routing.dll

and the runti

is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site p


is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site project


my current project references




i have a very annoying iis problem

iis server stops working until app pool is recycled


i am hoping that new visual studio (net framework 4.0) may solve this very annoying unsolveable problem


System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPerm


Good Day all,

Having an issue with an outside user accessing my IIS7 box. I do not have this problem when running the website from my host machine. I found this post: Http://forums.asp.net/t/1371394.aspx. I assure you that this is not a solution because I am not storing any of my files on a network share. 

What do you think my approach should be. 

I already have read rights to IIS user to my BIN folder. 

Thanks for the help. 

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