|
Send a test message and catch SmtpException and check the SmtpStatusCode.
|
|
|
|
|
Hi Samarjeet,
If you give wrong server entry, however It'll give an error like "Relay access denied on 5.7.xx" like that and if u give a wrong credentials it'll throw an error like "Could not connect to the host...". From these errors you can show your custom message to the user. I hope u understand it .
Rajendra Prasad Panchati
.Net/Sharepoint Software Enginner,
Hyderabad.
|
|
|
|
|
Hi,
firstly, sorry if I post it for 2nd times. because its a week I stuck in this problem
I am trying to build up my knowledge regarding ASP.Net and new things which I read from books. Frankly, its few days I got this error. after running my code I see this error
<br />
No matching bindings are available, and the type is not self-bindable. Activation path: 2) Injection of dependency CommunityUserRepository into parameter _rep of constructor of type AccountController 1) Request for AccountController <br />
it is the source code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Ninject.Core;
using SportsStore;
using SportsStore.WebUI.Controllers;
using System.Web.Routing;
using Ninject.Modules;
using Ninject.Core.Modules;
using SportsStore.Domain.Abstract;
using System.Configuration;
using SportsStore.Domain.Concrete;
namespace SportsStore.WebUI.Infrastructure
{
public class NinjectControllerFactory : DefaultControllerFactory
{
private IKernel Kernel = new StandardKernel(new SportsStoreServices());
protected override IController GetControllerInstance(RequestContext context,Type controllerType)
{
return controllerType == null ? null
: (IController)Kernel.Get(controllerType);
}
private class SportsStoreServices : StandardModule
{
public override void Load()
{
Bind<IProductRepository>().To<SqlProductRepository>().WithConstructorArgument
("connectionString", ConfigurationManager.ConnectionStrings["AppDb"].ConnectionString);
}
}
}
}
error occure in this line
<br />
protected override IController GetControllerInstance(RequestContext context,Type controllerType)<br />
{<br />
return controllerType == null ? null<br />
: (IController)Kernel.Get(controllerType); <br />
<br />
Could you please help me?
|
|
|
|
|
Hi there, i'm no ninject expert im afraid - only did one mvp-windows-mobile project with it -
so this may not be an answer..
..but obviously, the ninject kernel cannot inject CommunityUserRepository while creating the
controller instance. This usually means that no corresponding mapping has been loaded into the
kernel inside "Load". So maybe, you have to include a mapping for CommunityUserRepository in the kernels load-method. Also, the constructor parameter "xyRepository" of your controller should maybe
be an interface.
(There may be other places for ninject interface/implementation bindings, i dont know..)
|
|
|
|
|
I think the parameter "connectionString" of WithConstructorArgument must be the same with Constructor Argument of the class SqlProductRepository.
|
|
|
|
|
Hi guys,
I want to display date and time if I update my website in server(if i insert/update a row in particualar tables) . How to do it in asp.net with sql server database
Ahamed Azeem
software Programmer
|
|
|
|
|
Ahamed Azeem wrote: I want to display date and time if I update my website in server(if i insert/update a row in particualar tables) . How to do it in asp.net with sql server database
better to create a Log table. and display last update from Log Table.
|
|
|
|
|
If you add a "Modifydate" column to your table, then each time you update a row in the table, set the ModifyDate to the CurrentDate-Time. You can then issue a select max(ModifyDate) on that table to display the latest update date on your web page.
|
|
|
|
|
Hi Ahamed Azeem,
Please follow the below db statement.
SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'Your DB Name')
AND OBJECT_ID=OBJECT_ID('Your Table Name').
It'll show you last modified DateTime for a particular table in a particular DB. U can remove where condition to view all the records from all the DB tables.
I think u understand it ..
Rajendra Prasad panchati
.Net/Sharepoint Software Engineer.
Hyderabad.
|
|
|
|
|
I m new in Ajax and asp.Net Now i want learn ajax with asp . In My Visual studio 2008 , there is no option is Ajax Wizard . If need any thing install for Ajax , please let me know the URL . And Give simple idea for How can make simple application ...
Thanks...
|
|
|
|
|
Start working with scriptmanager and updatepanel controls for starters. Also try to improve your javascript (as AJAX is really almost nothing more than cool javascript) , and experiment with third party libraries. And actually you may find some articles here on CP[^] about asp.net and AJAX Good luck.
"My personality is not represented by my hometown."
|
|
|
|
|
|
dears,
the hex information i pasted containing the image information.
can anybdy help me to convert this hex to image.Pls pls help me.I am trying to do this from the last few weeks.pls share me ur ideas.i converted this to binary and tried to open it .but picture is showing with a cross icon.Pls give me some code for this.
01A4DDD9A1692360B771555A363DA9DC0FFD6C64B6757660F352A46F90039ACC676F6F63F69BECB83F562B23465F18E93F579A2C2653F201CB3903155D01EC7FFD7E43B4523FFE6E77B56F69B1F93FCD83F3F203F1EA4D2B83FA17C124113F1224A43F3FC638C74C5313C0731FBCB1FE62A5A659FFD0DA5F110BFF2CC1A70F01B3FB2465676917A1BDA36836FA342FFC4EDF78E33C7D29F73AADADB9E2D679BDE33F71F9E2AAC92D447FFFD1F44BBC86FE367485E3DA743A06ADED1D87E3F2BCA7A8E93FA8214762A3BE565F5D93F4C8FF95438DD3FE7FFD2ECC73FEC3F32F59DA3F3FA769479E634FDB2BCF7F7ACDC6C8AB3F3F20D5D
MEENU
|
|
|
|
|
|
I have been trying to show the image in simple Image. I have my code like this:
Image1.ImageUrl = "J:\\hint\\edit-handout-01.jpg";
but the image is not displaying.
suchita
|
|
|
|
|
To display an image the location must be accessible to ASP.NET. That usually means placing the images in a folder under the webapplication. Otherwise you need to modify the rights to j:\Hint so the asp_net user has access to it, which isn't the best practice.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hey,
isn't it something like
Server.MapPath("hint\\"+fleUpload.FileName)
suchita
|
|
|
|
|
something like this
Image1.ImageUrl=Server.MapPath("images/yourimage.jpg");
Server.MapPath return root path.
when your project on web, the image path of your image controls shows like <img src="images/yourimage.jpg"/>
|
|
|
|
|
so that means it doesn't matter where ever i put my project right. it will automatically take the server path so that i do not need to change the path again and again right.
suchita
|
|
|
|
|
SayamiSuchi wrote: so that means it doesn't matter where ever i put my project right. it will automatically take the server path so that i do not need to change the path again and again right.
yes no need to worry
|
|
|
|
|
|
SayamiSuchi wrote: thanks
welcome, but don't forget to rate if it help you.
|
|
|
|
|
Hey,
Well i did
fleUpload.SaveAs(Server.MapPath("hint\\" + fleUpload.FileName)); to save the image and it worked perfectly fine.
But I am trying to show the image from that server and for that i did
Image1.ImageUrl = (Server.MapPath("hint\\" + fleUpload.FileName));
The problem is it is not throwing any error but it is not showing the image in the Image1 either. What can be the reason for this and how to get the image ?
suchita
|
|
|
|
|
try this
string savepath=Server.MapPath("hint\\"+fleUpload.FileName);
fleUpload.SaveAs(savepath);
Image1.ImageUrl=savepath;
|
|
|
|
|
hi guys
i want a pretty good asp.net mailserver open source
give me a clue
|
|
|
|