|
I can open the database just fine with VS. I'm stumped. Any help would be great!
|
|
|
|
|
plz remove
Integrated Security=SSPI;"
Then try again
Sankarsan Parida
|
|
|
|
|
Hi all,
am working on Dynamic Menu its working fine in English when i convert this same menu in Arabic its working fine but the sub menu has some margin...if we set the margin then again for 2nd main menus submenu is not coming in order...
www.dreamcom.ae (This is for english working good)
www.dreamcom.ae/Ar/Index.aspx (This is for Arabic which is not working)
<asp:Menu ID="menuBar" StaticEnableDefaultPopOutImage="False" runat="server" Orientation="Horizontal"
onmenuitemclick="menuBar_MenuItemClick" DynamicHorizontalOffset="2" Font-Size="18px"
BackColor="#669903" ForeColor="White" StaticSubMenuIndent="100%" Font-Bold="True" Height="56px" vertical-align="top" top="50px"
margin="0px" position="static" BorderStyle="None" DynamicSelectedStyle-BorderStyle="None" BorderColor="#7ab802" CssClass="menucss">
<DynamicHoverStyle BorderStyle="Solid" BorderWidth="0px" BackColor="#7ab802" ForeColor="White" />
<DynamicMenuItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="0px" Font-Bold="true" Font-Size="17px" HorizontalPadding="6px" VerticalPadding="6px" />
<DynamicMenuStyle BorderColor="#669903" BorderStyle="Solid" BorderWidth="1px" BackColor="#669903" CssClass="menucss"/>
<DynamicSelectedStyle BorderColor="#3094FC" BorderStyle="Solid" BorderWidth="0px" ForeColor="#3094FC" BackColor="#5D7B9D" CssClass="menucss" />
<StaticHoverStyle BorderColor="#669903" BorderStyle="Solid" BorderWidth="0px" BackColor="#7ab802" ForeColor="#ffffff" CssClass="menucss" />
<StaticMenuItemStyle ForeColor="White" BorderStyle="Solid" BorderWidth="0px" Font-Size="14px" HorizontalPadding="15px" VerticalPadding="20px" CssClass="menucss" />
<StaticSelectedStyle BorderColor="#5CB8FF" BorderStyle="Solid" BorderWidth="1px" ForeColor="#fafafa" BackColor="#5CB8FF" />
</asp:Menu>
this code am using in both english and in arabic.....but in arabic am using style="direction:rtl;" hence it the direction of the content will change...
and am fetching english and arabic datas are fetch from database..
Kindly help me out...am trying from long time..
Thanks.
|
|
|
|
|
I have a page that performs a callback and I'm trying to handle the situation where the session has expired, but the callback is still being invoked.
I'm using the following code in my Global.asax
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Dim httpApp As HttpApplication = Context.ApplicationInstance
Dim httpEx As HttpException = httpApp.Server.GetLastError
If (httpEx IsNot Nothing) Then
If (httpEx.WebEventCode = System.Web.Management.WebEventCodes.AuditInvalidViewStateFailure Or _
httpEx.WebEventCode = System.Web.Management.WebEventCodes.InvalidViewState Or _
httpEx.WebEventCode = System.Web.Management.WebEventCodes.InvalidViewStateMac Or _
httpEx.WebEventCode = System.Web.Management.WebEventCodes.RuntimeErrorViewStateFailure) Then
HttpContext.Current.ClearError()
Response.Redirect("~/MyErrorPage.aspx", True)
End If
End If
End Sub
The problem is that it is not redirecting to my error page.
I'm testing this out on an IIS7 server and I force the error by stopping, then restarting the application pool on the server in between requests. Maybe I'm performing the wrong type of test.
Shouldn't this re-direction work?
Am I performing the correct type of test ?
Ugh.
|
|
|
|
|
The fact that your session is went done will not stop the web page to work perfectly correct! ViewState and all the related info was posted to the client (in hidden fields) and will be reused on the next post-back. The only problem with session down is authentication and data you stored on the session (ASP.NET engine do not store nothing on the session by default)...
More! You are using down-casting here which can be very dangerous...Who told you GetLastError will return an HttpException! Maybe it's a SystemException or a plain Exception?!
Also, if you read explanations of the error codes you use, you will see that none of them is connected to session end - http://msdn.microsoft.com/en-us/library/system.web.management.webeventcodes(v=vs.110).aspx[^]
If you want to catch session end - and maybe set a flag for later use - see for Globla.asax...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Hmmm. It seems thatI misunderstood the example code that I took off the web.
I will do some more research and re-attempt a solution.
Question: What is the best way to perform a session timeout situation? Is it possible in the VS2010 IDE ?
I've been publishing my App to a Sandbox IIS7 server and I've set the timeout to 1 minute, but this is cumbersome and difficult to debug.
Thanks for your help.
|
|
|
|
|
You can add a button (in debug mode) that will call Session.Abandon[^] for you...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
session.Abandon() is exactly what I needed. Test is perfect.
I will start a new thread for my next issue. "Response.Redirect" is not allowed in Callback.
Thanks for all your help.
|
|
|
|
|
Glad to help...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I have 2 Tables
1. TransTable
2. ErrorTable
TransTable has fields
TransID(PK),
TransDesc,
TransStatus
ErrorTable has fields
TransID(FK),
ErrorID(PK),
ErrorMessage
My Models are TransModel and ErrorModel .
TransModel
------------
int TransID
string TransDesc
string TransStatus
ErrorModel errorTable
ErrorModel
-----------
int TransID
int ErrorID
string ErrorMessage
My Problem
I need to query the DB and populate TransModel to display the table data.
So I want a method that returns
IEnumerable<TransModel>
How should I populate TransModel so that all the properties including the property errorTable gets populated
so that I can call in View as
model.errorTable.ErrorMessage .
Jeywin
modified 2-Jul-14 1:06am.
|
|
|
|
|
|
i have a image in database.
i want change size my image in html website without change to master image.
i used this code for resize me image:
string newPathToSave = @"\Images\Thumbnail\sample.jpg";
MemoryStream memory = new MemoryStream(File.ReadAllBytes("./Images/run.png"));
Image img = Image.FromStream(memory);
System.Drawing.Bitmap bmpResized = new System.Drawing.Bitmap(img, 248, 80);
bmpResized.Save(memory, img.RawFormat);
bmpResized.Save(newPathToSave);
img.Dispose();
bmpResized.Dispose();
i use this namespace:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Drawing;
using System.Drawing.Bitmap;
using System.IO;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
but,i get error :
Error 10 A using namespace directive can only be applied to namespaces; 'System.Drawing.Bitmap' is a type not a namespace F:\Education\Education\sendNewsPage.aspx.cs 15 7 Education
|
|
|
|
|
mor kan wrote: using System.Drawing.Bitmap;
mor kan wrote: A using namespace directive can only be applied to namespaces
mor kan wrote: 'System.Drawing.Bitmap' is a type not a namespace
Did you actually read the error message?
- A
using namespace directive can only be applied to a namespace, not a type; System.Drawing.Bitmap is a type, not a namespace;- You have
using System.Drawing.Bitmap; in your file on line 15;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i changed my code :
string newPathToSave = @"F:\Education\Education\Images\Thumbnail\sample.jpg";
MemoryStream memory = new MemoryStream(File.ReadAllBytes(@"F:\Education\Education\Images\run.png"));
System.Drawing.Image img = System.Drawing.Image.FromStream(memory, true);
System.Drawing.Bitmap bmpResized = new System.Drawing.Bitmap(img, 248, 80);
bmpResized.Save(memory, img.RawFormat);
bmpResized.Save(newPathToSave);
img.Dispose();
bmpResized.Dispose();
myuser.SrcNews = newPathToSave;
but:
System.Runtime.InteropServices.ExternalException was unhandled by user code
Message="A generic error occurred in GDI+."
Source="System.Drawing"
ErrorCode=-2147467259
StackTrace:
at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(String filename, ImageFormat format)
at System.Drawing.Image.Save(String filename)
at Education.WebForm5.sendNewsBtn_Click(Object sender, EventArgs e) in F:\Education\Education\sendNewsPage.aspx.cs:line 56
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
|
|
|
|
|
my problem solved by code & create Thumbnail\sample.png in f: drive :
string newPathToSave = @"F:\Education\Education\Images\Thumbnail\sample.png";
MemoryStream memory = new MemoryStream(File.ReadAllBytes(@"F:\Education\Education\Images\run.png"));
System.Drawing.Image img = System.Drawing.Image.FromStream(memory, true);
System.Drawing.Bitmap bmpResized = new System.Drawing.Bitmap(img, 248, 80);
bmpResized.Save(memory, img.RawFormat);
bmpResized.Save(newPathToSave);
img.Dispose();
bmpResized.Dispose();
myuser.SrcNews = newPathToSave;
but :
do not show any image , why?
|
|
|
|
|
You're setting the URL of the image to a local path on your server. That won't work; you need to set it to the relative path of the image on your site.
For example, if your images are stored in a folder called "thumbnail" within a folder called "images" which is in the root of your site, then you should set the URL to "~/images/thumbnail/sample.png"
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
guys;
I have a drop down in an aspx page, its rendered with an uniqueid (name) that begins with 'ctl' but with a ClientID(id) that doesn't begin with that prefix.
any body knows why.
Help people,so poeple can help you.
|
|
|
|
|
ASP.NET rendering engine creates all id attributes to ensure that your page comforts with HTML standard (unique id).
Read here some explanations about it: http://msdn.microsoft.com/en-us/library/vstudio/1d04y8ss(v=vs.100).aspx[^]
Also notice, that you can control (to a certain level) how those ids are generated...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Sir;
Thank you for your reply,But it was simpler than that.
I just associated the deployed version with an application pool that uses 4.0 framework.
And when I changed it to 2.0, every thing worked normally.
Help people,so poeple can help you.
|
|
|
|
|
I'm glad you found a solution!
Now I suggest you go and learn the differences between ASP.NET 2.0 and 4.x regarding id generation in web pages - it is important!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Yes, because if you left the ClientID Mode not set it would take the default value from the application bool which is predicable by default which can make some confusion
Help people,so poeple can help you.
|
|
|
|
|
Nice! And that because All-Mighty-Microsoft decided to change default behavior...Hallelujah!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
hey guys anybody know of open source . net cms i can use on iis6 and using asp.net 4 and .net 4 framework ??
|
|
|
|
|
|
hey guys i im trying tp install Umbraco 6 on iis6 and get this error when i try browse the site have no clue why or how to fix it and theres notthing on the site
Server Error in '/umbro' Application.
--------------------------------------------------------------------------------
Could not load file or assembly 'System.Net.Http' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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: System.IO.FileLoadException: Could not load file or assembly 'System.Net.Http' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Net.Http' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileLoadException: Could not load file or assembly 'System.Net.Http' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
[FileLoadException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +591
[HttpException (0x80004005): Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8946484
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
|
|
|
|